Block chain-based power distribution system data sharing method
Technical Field
The invention relates to the technical field of power distribution systems, in particular to a block chain-based power distribution system data sharing method.
Background
The power distribution system is a system consisting of a power distribution station, a high-voltage distribution line, a distribution transformer, a low-voltage distribution line and corresponding control protection equipment, and the common power supply mode of the power distribution system is a three-phase three-wire system or a three-phase four-wire system. The main operating parameters of the power distribution system include voltage, current, power, temperature, etc., and in order to monitor the operating conditions of the power distribution system, regular or irregular rounds of inspection and recording of the operating parameters are required. At present, the operation parameters are acquired mainly by manual transcription or remote acquisition of partial data in the prior art, and data tracking and shared query are difficult to achieve.
Therefore, a method for sharing data of a power distribution system based on a block chain, which is simple in logic and reliable in sharing, is urgently needed.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method for sharing data of a power distribution system based on a block chain, and the technical solution adopted by the present invention is as follows:
the data sharing method of the power distribution system based on the block chain is characterized in that a data acquisition module, a data conversion module, a power distribution system controller, a data transmission module and a hollow server are adopted for data sharing, and the data sharing method of the power distribution system comprises the following steps:
establishing a block chain structure of any equipment in the power distribution system according to the station number and the equipment number of the power distribution system, encrypting the station number and the equipment number by adopting a symmetric algorithm, and adding a timestamp to obtain a block head of any equipment;
sequentially acquiring the operating parameters of equipment in the power distribution system by using a data acquisition module;
performing analog-to-digital conversion on the operation parameters by using a data conversion module to obtain digital signals of the operation parameters;
the power distribution system controller acquires a digital signal, encrypts the digital signal by adopting a public key of a Hash algorithm, uploads the encrypted digital signal to a block chain corresponding to the equipment, and arranges the encrypted digital signal behind a block head according to a time sequence; the private key encrypted by the Hash algorithm is encrypted and fed back to the hollow server by adopting an asymmetric algorithm;
transmitting the private key encrypted by the asymmetric algorithm by using a data transmission module;
the hollow server obtains a private key by adopting asymmetric algorithm decryption, matches the private key with a public key of a Hash algorithm, accesses a block chain and obtains equipment operation parameters.
Further, the operating parameters include voltage, current, power, temperature, and electrical degrees.
Further, after encrypting the station number and the device number by using the symmetric algorithm, the method further includes:
after the station number and the equipment number are encrypted by the private key of the symmetric algorithm, the public key of the symmetric algorithm is broadcasted to any node of the power distribution system.
Preferably, the digital signal is encrypted using SHA256 hash algorithm.
Compared with the prior art, the invention has the following beneficial effects:
the invention skillfully adopts a symmetric algorithm to encrypt the station number and the equipment number so as to ensure the equipment access publicity, wherein any node is accessed; in addition, the invention adopts the twice encryption equipment operation parameters of Hash and asymmetric algorithm, so as to facilitate the safe transmission of the data transmission module, effectively avoid the illegal node from entering the data transmission module to operate the equipment, and realize the effective separation of equipment control and equipment data monitoring, and the invention adopts software to isolate, thereby ensuring the reliable operation of the equipment; the Hash and asymmetric algorithm has indecomposable performance, so that the control and monitoring data can not be crossed; in conclusion, the invention has the advantages of simple structure, simple logic, reliable sharing and the like, and has very high practical value and popularization value in the technical field of power distribution systems.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of protection, and it is obvious for those skilled in the art that other related drawings can be obtained according to these drawings without inventive efforts.
FIG. 1 is a logic flow diagram of the present invention.
Detailed Description
To further clarify the objects, technical solutions and advantages of the present application, the present invention will be further described with reference to the accompanying drawings and examples, and embodiments of the present invention include, but are not limited to, the following examples. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Examples
As shown in fig. 1, the present embodiment provides a block chain-based power distribution system data sharing method, which follows the existing data acquisition module, data conversion module, power distribution system controller, data transmission module and hollow server for data sharing.
The following detailed description describes the data sharing method of the power distribution system, which comprises the following steps:
firstly, establishing a block chain structure of any equipment in the power distribution system according to the station number and the equipment number of the power distribution system, encrypting the station number and the equipment number by adopting a symmetric algorithm, and adding a time stamp to obtain a block head of any equipment; because the power distribution system has an independent and unique number, the station number + the equipment number in the jurisdiction area where the power distribution system is located are the identity information of the equipment, in this embodiment, a block chain based on the identity information is established, and the data of the block chain can be traced and shared. In addition, in this embodiment, the station number and the device number are encrypted by using the private key of the symmetric algorithm, and the public key of the symmetric algorithm is broadcast to any node of the power distribution system.
The symmetric algorithm refers to that encryption and decryption use the same secret key, so the symmetric algorithm is called symmetric encryption. Symmetric encryption has only one key as the private key.
And secondly, sequentially acquiring the operating parameters of the equipment in the power distribution system by using the data acquisition module, wherein the operating parameters comprise voltage, current, power, temperature, electric degree and the like, and in the embodiment, the acquired operating data are analog quantities.
And thirdly, performing analog-to-digital conversion on the operation parameters by using a data conversion module to obtain digital signals of the operation parameters.
Fourthly, the power distribution system controller acquires the digital signal, encrypts the digital signal by adopting a public key of an SHA256 Hash algorithm, uploads the encrypted digital signal to a block chain corresponding to the equipment, and arranges the encrypted digital signal behind the block head according to the time sequence; and feeding back the private key encrypted by the Hash algorithm to the hollow server by adopting asymmetric algorithm encryption.
For any length of message, SHA256 generates a 256-bit hash value, called a message digest. This digest is equivalent to an array of 32 bytes in length, usually represented by a 64-byte hexadecimal string, where 1 byte is 8 bits and a hexadecimal character is 4 bits in length.
And fifthly, transmitting the private key encrypted by the asymmetric algorithm by using a data transmission module.
Asymmetric encryption refers to: encryption and decryption use different keys, one as the public key and the other as the private key. The public key encrypted information can be decrypted only by the private key. The private key can decrypt the encrypted information only by the public key. The private key can only be safely kept by one party and cannot be leaked out, while the public key can be sent to any person who requests it. Asymmetric encryption uses one of the pair of keys for encryption, while decryption requires the other key.
And sixthly, the hollow server decrypts by adopting an asymmetric algorithm to obtain a private key, matches the private key with a public key of a Hash algorithm, accesses a block chain and obtains equipment operation parameters.
The invention skillfully adopts a symmetric algorithm to encrypt the station number and the equipment number so as to ensure the equipment access publicity, wherein any node is accessed; in addition, the invention adopts the twice encryption equipment operation parameters of Hash and asymmetric algorithm, so as to facilitate the safe transmission of the data transmission module, effectively avoid the illegal node from entering the data transmission module to operate the equipment, and realize the effective separation of equipment control and equipment data monitoring, and the invention adopts software to isolate, thereby ensuring the reliable operation of the equipment; the Hash and asymmetric algorithm has indecomposable performance, so that the control and monitoring data can not be crossed; in conclusion, the invention has the advantages of simple structure, simple logic, reliable sharing and the like, and has very high practical value and popularization value in the technical field of power distribution systems.
The above-mentioned embodiments are only preferred embodiments of the present invention, and do not limit the scope of the present invention, but all the modifications made by the principles of the present invention and the non-inventive efforts based on the above-mentioned embodiments shall fall within the scope of the present invention.