Power network security storage method and supervision and inspection method based on blockchain
By adopting blockchain-based storage methods and supervision and inspection methods in power network security supervision and inspection, the problem of relying on paper material records in the prior art is solved, achieving higher fairness and objectivity, ensuring that The immutability of data.
Patent Information
- Application Number
- CN202110631318.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-07
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-06-07
AI Technical Summary
During the existing power network security supervision, inspection and inspection process, materials such as paper material records and network screenshots are easily tampered with, resulting in poor fairness and objectivity.
The blockchain-based power network security storage method is adopted to ensure the immutability of data by periodically collecting equipment data, generating hash values and storing it in the blockchain. At the same time, a blockchain-based supervision and inspection method is provided, which verifies the security status of the power network by extracting some blocks in the blockchain with off-chain data.
It improves the fairness and objectivity of network security supervision, inspection and detection, ensures the immutability of recorded information, avoids simple coping and malicious fraud, which is conducive to supervision and requires corresponding units to do a good job in network security.
Smart Images

Figure CN113420085B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power network security, and in particular to a power network security storage method and a supervision and inspection method based on blockchain. Background Art
[0002] At present, cybersecurity threats have gradually evolved from single virus threats to new trends such as malware, ransomware, and spyware, which are increasingly harmful and directly endanger the safe and stable operation of critical power information infrastructure. In addition, with the intensification of the international cybersecurity game and the vigorous promotion of domestic power digital new infrastructure, the cybersecurity risks faced by power companies are also increasing, and there is an urgent need to strengthen the security supervision and inspection of network security from both technical and management aspects.
[0003] In the past, the main methods of domestic power network security management were: safety evaluation, "four no's and two direct" surprise supervision and inspection, special supervision and inspection, etc., and the technical means to match them often relied on traditional network security detection equipment, lacking professional network security supervision and inspection methods and dedicated tools and devices. Generally, the fairness and objectivity of network security supervision and inspection and testing depends on the non-tamperability of the inspection and testing process and recorded information. At present, paper records and network screenshots are mainly used as supporting materials, and the authenticity is easily questioned. Therefore, it is urgent to adopt new technologies to strengthen the objectivity of the network security supervision and inspection and testing process.
[0004] Therefore, how to ensure the fairness and objectivity of network security supervision, inspection and testing, and how to ensure that recorded information cannot be tampered with have become urgent issues that need to be resolved. Summary of the invention
[0005] In view of this, the present invention provides a blockchain-based power network security storage method and supervision and inspection method to solve the problem that in the previous network security supervision, inspection and detection process, materials such as paper records and network screenshots are easily tampered with, resulting in poor fairness and objectivity in network security supervision, inspection and detection.
[0006] In one aspect, the present invention provides a blockchain-based power network security storage method, the storage method comprising the following steps:
[0007] S1: Periodically collect equipment data in the power system and verify whether the equipment data is correct. The equipment data includes: record data and log data;
[0008] S2: If the device data is correct, generate a corresponding first Hash value using a function for the content of the device data;
[0009] S3: According to the type of the device data, the first Hash value corresponding to the device data is calculated again to obtain a second Hash value;
[0010] S4: The second Hash value is timestamped to form a timestamped Hash value, and then stored in the blockchain.
[0011] Preferably, the blockchain-based power network security storage method further includes: performing hash operations again on the adjacent time-stamp Hash values in the stored time-stamp Hash values to form a Hash verification chain, which is stored in the blockchain.
[0012] Further preferably, in step S3, according to the type of the device data, the first Hash value corresponding to the device data is calculated again to obtain a second Hash value, specifically:
[0013] When the device data is record-type data, Hash values of the same device at fixed intervals are hashed in pairs, and a second Hash value is obtained and stored;
[0014] When the device data is log-type data, Hash values of different devices at the same time are hashed in pairs, and after the second Hash value is obtained, it is stored.
[0015] Further preferably, the blockchain is composed of multiple blocks, and the data structure of each block specifically includes: a block header, a block body, and a digital signature.
[0016] Further preferably, the block header includes: an ID number, a historical hash value, the number of records contained in the block, a timestamp, and a Merkle root.
[0017] Further preferably, the block body includes: a plurality of record entries, and each record entry includes: a record number, a subject identification identity, a subject information description, an information content hash value, a provider signature, and an information provision address.
[0018] On the other hand, the present invention also provides a blockchain-based power network security supervision and inspection method, which includes the following steps:
[0019] The equipment data in the power system is stored in the blockchain according to the above storage method;
[0020] Extract some blocks from the blockchain and compare them with the off-chain data. If they are consistent, the power network is safe, otherwise, vice versa.
[0021] Preferably, the extracting of some blocks in the blockchain and comparing them with the off-chain data is specifically as follows:
[0022] After extracting some blocks in the blockchain, extracting the record information in the blocks;
[0023] Selecting a time stamp hash value in the record information;
[0024] After performing an inverse operation on the time-stamped Hash value, the on-chain data information is obtained;
[0025] Compare the on-chain data information with the off-chain data information.
[0026] The blockchain-based power network security storage method provided by the present invention applies blockchain technology to the equipment data storage of the power system, and performs multiple hash value operations during the storage process to reduce the storage volume, and selects corresponding operation rules according to the properties of different data types in the power system.
[0027] The blockchain-based power network security supervision and inspection method provided by the present invention utilizes the tamper-proof and traceable characteristics of blockchain to support the needs of network security supervision and inspection, ensure the effective recording of daily network security work, avoid simple coping and malicious fraud, and is conducive to supervising and requiring relevant units to do a good job in network security.
[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0031] Figure 1 A flowchart of a power network security storage method based on blockchain provided by an embodiment of the present invention;
[0032] Figure 2 A data structure diagram of a blockchain in a power network security storage method based on blockchain provided by an embodiment of the present invention;
[0033] Figure 3 A flowchart of block generation in a power network security storage method based on blockchain provided in an embodiment disclosed by the present invention;
[0034] Figure 4 A flowchart of on-chain and off-chain comparison and verification in a blockchain-based power network security supervision and inspection method provided in an embodiment disclosed by the present invention. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods consistent with some aspects of the present invention as detailed in the appended claims.
[0036] In order to solve the problem that the previous network security supervision and inspection and testing process relied on paper records and network screenshots, which were easily tampered with, resulting in poor fairness and objectivity in network security supervision and inspection and testing. This implementation scheme provides a blockchain-based power network security storage method for preventing the malicious tampering of device data in the power network. Figure 1 , the storage method specifically includes the following steps:
[0037] S1: Periodically collect equipment data in the power system and verify whether the collected equipment data is correct. The above-mentioned equipment data includes: record data and log data. The verification of whether the collected equipment data is correct mainly includes two aspects: 1) verifying whether the data source is correct; 2) verifying whether the data subject identification is correct;
[0038] S2: If the device data is correct, the content of the device data is used to generate a corresponding first Hash value through a function, specifically: the device data is used to generate identification information such as the time of generation, generate a data subject information description, and then generate an information content hash value;
[0039] S3: According to the type of device data, the first Hash value corresponding to the device data is calculated again to obtain a second Hash value. The main purpose of this step is to compress the amount of stored feature data, so a secondary hash operation is performed;
[0040] S4: The second Hash value is timestamped to form a timestamped Hash value and then stored in the blockchain.
[0041] In order to play the role of auxiliary verification, follow the logical correlation between the parent node and the child node of the blockchain, and increase the difficulty of data tampering. As an improvement of the technical solution, the adjacent time-stamp Hash values in the stored time-stamp Hash value are hashed again to form a Hash verification chain, which is stored in the blockchain.
[0042] In the above step S3, according to the type of device data, the first Hash value corresponding to the device data is calculated again to obtain the second Hash value. According to the type of different device data, the corresponding operation rules are selected to perform a second hash operation, as follows:
[0043] Since the core of record data lies in the content of the record, when the device data is record data, the Hash values of the same device with fixed intervals are hashed in pairs, and the second Hash value is obtained and stored. The specific calculation formula is as follows:
[0044]
[0045] Among them, j represents the node ID number, t represents the recording time, T represents the interval period, and n represents the number of periods.
[0046] Since log-type data has real-time requirements, when the device data is log-type data, the hash values of different devices at the same time are hashed in pairs, and the second hash value is obtained and stored. The specific calculation formula is as follows:
[0047]
[0048] Among them, j represents the node ID number, t represents the recording time, Ⅰ and Ⅱ represent different device models, and n represents the number of devices.
[0049] See also Figure 2 The above-mentioned blockchain is specifically composed of multiple blocks, and the data structure of each block specifically includes: block header, block body and digital signature.
[0050] 1. The block header includes five aspects, as follows:
[0051] 1) ID number: responsible for marking the ID information of the block, that is, the logical position of the block in the blockchain, usually accumulated in sequence, obtained by adding 1 to the ID value of the previous block;
[0052] 2) Historical Hash value: the Hash value of the previous block, which is used to reflect the correlation between blocks in the blockchain and provide tamper-proof function;
[0053] 3) The number of records contained in this block: that is, the NUM value, which is convenient for aggregation, retrieval, query and use;
[0054] 4) Timestamp: Usually a sequence of characters that uniquely identifies a certain moment in time and is used to record the writing time of the current block data. Each timestamp in a subsequent block will enhance the previous timestamp, forming a chain of increasing time. Timestamps add a time dimension, making data easier to trace and making it possible to reproduce history;
[0055] 5) Merkle root: It is the final result of the Merkle tree continuously performing hash operations. The Merkle tree is a type of tree in the data structure. Its main function is to quickly summarize and verify the integrity of block data. It groups the data in the blockchain for hash operations, and continuously recursively operates upward to generate new hash nodes. In the end, only one Merkle root is left to be stored in the block header. Each hash node always contains two adjacent data blocks or their hash values. The use of the Merkle tree structure can effectively improve the operating efficiency and scalability of the blockchain, so that the block header only needs to contain the root hash value without encapsulating all the underlying data.
[0056] 2. The block body consists of summary record entries of the original data information that constitutes the current block, where each record entry includes: record number, subject identification, subject information description, information content hash value, provider signature and information provision address.
[0057] 1) Record number: Each record entry has a unique identification number for easy management and reverse query;
[0058] 2) Subject identification: similar to ID number or name, used to clarify data ownership;
[0059] 3) Main information description: including information such as data generation date, data type, etc. that can be used to generate a summary;
[0060] 4) Information content hash value: obtained by hashing the original data to help achieve tamper-proof properties;
[0061] 5) Provider signature: a digital signature used to identify the data provider;
[0062] 6) Information provision address: used to indicate which unit / server the data comes from, etc., to facilitate management, query and verification.
[0063] 3. A digital signature is to add another paragraph of content after the information as proof of the sender and to prove that the information has not been tampered with. Generally, the sender processes the information with a hash algorithm to obtain a hash value, encrypts the hash value with a private key, and obtains a signature. The sender then sends the information and the signature to the receiver. The receiver uses the sender's public key to decrypt the signature and restore the hash value, and then uses the hash algorithm to verify whether the hash value of the information is consistent with the hash value restored by the decrypted signature, so as to identify whether the information comes from the sender or verify whether the information has been tampered with.
[0064] The data in the blockchain mentioned above is not just the original data or transaction records, but also their hash function values, that is, the original data is encoded into a string of numbers and letters of a specific length and recorded in the blockchain. Hash functions have many advantages for storing blockchain data:
[0065] 1) Data processed by the hash function is one-way, and it is almost impossible to calculate the original input value through the processed output value;
[0066] 2) The time taken by the hash function to process data of different lengths is consistent, and the output value is also of fixed length;
[0067] 3) Even if the input value of the hash function differs by only one byte, the output value will be very different. The most commonly used hash function is the double SHA256 hash function, which simply means processing the original data of different lengths twice with the SHA256 hash function, and then outputting a binary number with a length of 256 for unified identification and storage.
[0068] See also Figure 3 , for those who cannot implement the specific process of block generation provided by the scheme, firstly, the data of relevant equipment within the unit period is collected, and data identity authentication (public-private key docking) is performed at the same time to achieve preliminary security protection verification, and then hash value generation, record number allocation, subject identity identification, and signature provision are performed, and finally a packaged block is formed.
[0069] In the above-mentioned blockchain-based power network security storage method, this embodiment also provides a supervision and inspection method, which specifically includes the following steps:
[0070] The equipment data in the power system is stored in the blockchain according to the above storage method;
[0071] Extract some blocks from the blockchain and compare them with the off-chain data. If they are consistent, the power network is safe, otherwise, vice versa.
[0072] Among them, some blocks in the blockchain are extracted and compared with the off-chain data, specifically:
[0073] After extracting some blocks in the blockchain, extracting the record information in the blocks;
[0074] Selecting a time stamp hash value in the record information;
[0075] After performing an inverse operation on the time-stamped Hash value, the on-chain data information is obtained;
[0076] Compare the on-chain data information with the off-chain data information.
[0077] Considering the large number of power system equipment types, the large number of servers, and the large amount and type of logs, it will consume a lot of resources if all data extraction and analysis are carried out in the network security inspection room. Therefore, the blocks selected during the supervision and inspection can be supervised by random sampling.
[0078] The network security supervision and inspection based on the blockchain traceability mechanism uses the comparison between the on-chain blocks and the off-chain spot check data, and finally conducts effective supervision and verification. The on-chain part of the blockchain is selected for comparison with the actual off-chain data. The specific spot check of the block adopts the combination of the "four no's and two direct" innovative supervision and inspection and the typical special supervision and inspection methods. For the supervision and inspection comparison process, the relevant information in the blockchain is first extracted, and then the hash time stamp value is selected to compare with the off-chain data information to verify whether the data uploaded to the block is true. The on-chain and off-chain comparison and verification process of the supervision and inspection is as follows Figure 4 shown.
[0079] This implementation plan is based on the tamper-proof and traceable characteristics of blockchain, which can well support the needs of network security supervision and testing, ensure the effective record of daily network security work, avoid simple coping and malicious fraud, and is conducive to supervising and requiring relevant units to do a good job in network security.
[0080] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0081] It should be understood that the present invention is not limited to what has been described above and that various modifications and changes may be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A blockchain-based power network security storage method, characterized in that: The steps include: S1: Periodically collect equipment data in the power system and verify whether the equipment data is correct. The equipment data includes: record data and log data; S2: If the device data is correct, generate a corresponding first Hash value using a function for the content of the device data; S3: According to the type of the device data, the first Hash value corresponding to the device data is calculated again to obtain a second Hash value; specifically: When the device data is record-type data, Hash values of the same device at fixed intervals are hashed in pairs, and a second Hash value is obtained and stored; When the device data is log-type data, the Hash values of different devices at the same time are hashed in pairs, and the second Hash value is obtained and stored; S4: The second Hash value is timestamped to form a timestamped Hash value, and then stored in the blockchain.
2. According to claim 1, the power network security storage method based on blockchain is characterized in that: Also includes: The adjacent time-stamp Hash values before and after the stored time-stamp Hash values are hashed again to form a Hash verification chain, which is stored in the blockchain.
3. According to the blockchain-based power network security storage method of claim 1, it is characterized in that: The blockchain is composed of multiple blocks, and the data structure of each block specifically includes: a block header, a block body, and a digital signature.
4. According to claim 3, the power network security storage method based on blockchain is characterized in that: The block header includes: ID number, historical hash value, number of records contained in this block, timestamp and Merkle root.
5. According to claim 3, the power network security storage method based on blockchain is characterized in that: The block body includes: multiple record entries, and each record entry includes: record number, subject identification identity, subject information description, information content hash value, provider signature and information provision address.
6. A blockchain-based power network security supervision and inspection method, characterized in that: The method comprises the following steps: storing the equipment data in the power system in a blockchain according to the storage method described in any one of claims 1 to 5; Extract some blocks from the blockchain and compare them with the off-chain data. If they are consistent, the power network is safe, otherwise, vice versa.
Citation Information
Patent Citations
Data processing method and device
CN106156130A
File storage method and electronic device thereof, and storage medium
CN109409122A