CN114661231B - Storage synchronization method and device for parameter change records of power grid monitoring master station system - Google Patents

Storage synchronization method and device for parameter change records of power grid monitoring master station system Download PDF

Info

Publication number
CN114661231B
CN114661231B CN202210151351.7A CN202210151351A CN114661231B CN 114661231 B CN114661231 B CN 114661231B CN 202210151351 A CN202210151351 A CN 202210151351A CN 114661231 B CN114661231 B CN 114661231B
Authority
CN
China
Prior art keywords
block
information
parameter change
hash value
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210151351.7A
Other languages
Chinese (zh)
Other versions
CN114661231A (en
Inventor
刘德贺
江伟
张高峰
马光
解凯
胡荣
张喜铭
方文崇
梁寿愚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Co Ltd
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
China Southern Power Grid Co Ltd
NR Electric Co Ltd
NR Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Southern Power Grid Co Ltd, NR Electric Co Ltd, NR Engineering Co Ltd filed Critical China Southern Power Grid Co Ltd
Priority to CN202210151351.7A priority Critical patent/CN114661231B/en
Publication of CN114661231A publication Critical patent/CN114661231A/en
Application granted granted Critical
Publication of CN114661231B publication Critical patent/CN114661231B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0637Permissions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Supply And Distribution Of Alternating Current (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Remote Monitoring And Control Of Power-Distribution Networks (AREA)

Abstract

The invention discloses a storage synchronization method and a device for parameter change records of a power grid monitoring master station system, wherein the method comprises the following steps: receiving parameter change information of equipment operation sent by a client; analyzing the parameter change information, analyzing a client user mark, and checking whether the user has the authority of modifying and setting the equipment parameters; after confirming that the user is qualified, identifying parameter change information, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode; taking the calculated root hash value as a part of information of the block head; the service node N for completing the assembly of the block head broadcasts the whole block information, and other service nodes verify the validity of the block after receiving the information; the invention solves the problem that the data can not be updated when the power grid monitoring master station system centralized operation parameter changing service fails.

Description

Storage synchronization method and device for parameter change records of power grid monitoring master station system
Technical Field
The invention relates to a storage synchronization method and device for parameter change records of a power grid monitoring master station system, and belongs to the technical field of distributed power grid monitoring master station systems.
Background
In recent years, with the rapid development of information technologies such as cloud computing and blockchain, a server of a power grid monitoring master station system is gradually deployed in a distributed multi-node cluster mode, meanwhile, operation monitoring personnel interact with the monitoring master station server through a client, and interaction data content comprises inquiry monitoring data, control of equipment states, setting of equipment operation parameters and the like. The setting and changing of the operation parameters relate to safe and stable operation of a power grid of the power system, and it is important to ensure consistency of storage and synchronization of the operation parameters of the power grid. The existing storage and synchronization method of the operation parameter change generally adopts a centralized mode, namely after the client initiates the operation parameter change setting, a parameter setting request is received at a server through an on-duty node, then the operation parameters are matched and updated in a power grid unified model database according to equipment codes in the request information, and then the parameter change record is synchronized in a whole system according to synchronization completion of the unified model database.
The power grid monitoring master station system adopts centralized receiving and updating operation parameter changing and has the following defects: (1) When the master station service end on duty node fails, the device parameter changing request of the client cannot be received, and the operation parameter setting and changing fails. (2) When the on-duty node is switched from one node to another node, if the client initiates a request at this time, the request may be discarded.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides a storage synchronization method and a storage synchronization device for a system parameter change record of a power grid monitoring master station, which overcome the defects that the operation parameter change of power grid equipment fails or the operation parameter change request of the equipment is discarded due to centralized updating and synchronization in the prior art.
In order to achieve the above purpose, the invention is realized by adopting the following technical scheme:
in a first aspect, the present invention provides a method for synchronizing storage of parameter change records of a power grid monitoring master station system, which is applied to a service node of the power grid monitoring master station, and includes:
receiving parameter change information of equipment operation sent by a client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to a permission database, and checking whether the user has the permission for modifying and setting the equipment parameters;
after confirming that the user is qualified, identifying parameter change information, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, request time, a father block hash value, a random number and workload certification information;
the service node N for completing the assembly of the block head broadcasts the whole block information, other service nodes verify the validity of the block after receiving the information, and if the block is valid, the service node N is added into a local latest block chain; and according to the parameter change record information in the block, changing the parameters in the local equipment library, after finishing the change, replying confirmation information to the sending node N, and after receiving more than half of node confirmation, updating the parameter change in the local equipment library by the node N.
Further, the parameter change information includes: user identification, request time, device unique code, device parameter name, parameter value before device change, complete request information of parameter value after device change.
Further, the complete request information includes one or more groups of operation time, unique equipment code, equipment parameter name and change records of parameters before and after equipment change.
Furthermore, any two service nodes in the power grid monitoring master station system can perform synchronization of parameter change record block chains, and the synchronization mode is divided into two cases:
(3) The two node parameters change the lengths of the blockchains to be different, and the long chain comprises a short chain, so that the lengths of local blockchains of the two service nodes are compared, and the nodes with the chain lengths are automatically synchronized from the nodes with the chain lengths to the nodes with the short blockchains;
(4) If the two node parameter change blockchains are bifurcated, that is, some parent blocks in the two blockchains are identical, the two nodes broadcast a difference block synchronization request from the first divergence difference block, and the blocks with more than half of recovery confirmation are considered as effective blocks, and the other invalid block is automatically synchronized by the effective blocks.
Further, the calculating the hash value for each set of change information, further calculating new hash values for the hash values of two adjacent sets, and finally calculating a root hash value of a binary tree according to a binary tree mode includes:
generating a hash value with a fixed 256-bit length for each group of change information by adopting an SHA256 hash algorithm aiming at each group of change to form a leaf layer L1 of a binary tree;
according to two adjacent hash values, inputting the hash value into an SHA256 hash algorithm to calculate a new hash value, if a single hash value exists, copying the hash value, and inputting the hash algorithm to calculate the new hash value, so that a second layer L2 of the binary tree is formed;
and finally calculating the root hash value of the highest layer of the binary tree by analogy.
Further, the method for acquiring the workload certification information comprises the following steps:
calculating a primary state estimation by adopting a state estimation calculation method special for a power grid monitoring master station according to a data section of the request time and combining a power grid structure of an equipment model library;
taking the power value of the position corresponding to the random number in the circuit table in the calculation result as the work load proving information; the random number is an unsigned integer, if the random number is larger than the number of the line devices, the line devices are subjected to modular calculation to obtain an integer smaller than the number of the line devices, and then the power value of the position corresponding to the numerical value in the line table is obtained.
Further, the service node N that completes the assembly of the block header broadcasts the entire block information, and after receiving the information, other service nodes verify the validity of the block, and if the block is valid, the service node N adds the block to the local latest block chain, including:
after the service node which completes the assembly issues the block information, other service nodes calculate root hash values according to the received change record information in the block body, compare the root hash values with the root hash values in the block header information, and verify the validity of the parameter change information;
acquiring a data section according to the request time in the block head, calculating a state estimation value by combining with a power grid structure of an equipment model library, further acquiring a numerical value in a random number position of a corresponding circuit table according to the random number in the block head, comparing the numerical value with the work load proving information in the block head, and considering that the work load proving is effective if the numerical values are consistent;
and comparing the hash value of the parent block in the block header with the hash value of the local parent block, if the hash value of the parent block is consistent with the hash value of the local parent block, linking the received parameter change block with the local block, and simultaneously replying confirmation information to a sending node assembled by the blocks.
In a second aspect, the present invention provides a storage synchronization device for parameter change records of a power grid monitoring master station system, which is applied to a service node of the power grid monitoring master station, and includes:
the parameter change information receiving unit is used for receiving parameter change information of equipment operation sent by the client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
the parameter change information analysis and verification unit is used for analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to the authority database, and verifying whether the user has the authority for modifying and setting the equipment parameters;
the parameter change information identification unit is used for identifying parameter change information after confirming that the user is qualified, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
the input unit is used for taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, a request time, a father block hash value, a random number and workload certification information;
the updating unit is used for completing the service node N of the block head assembly, broadcasting the whole block information, verifying the validity of the block after other service nodes receive the block information, and adding the block into a local latest block chain if the block is valid; and according to the parameter change record information in the block, changing the parameters in the local equipment library, after finishing the change, replying confirmation information to the sending node N, and after receiving more than half of node confirmation, updating the parameter change in the local equipment library by the node N.
In a third aspect, the invention provides a storage synchronization device for parameter change records of a power grid monitoring master station system, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is operative according to the instructions to perform the steps of the method according to any one of the preceding claims.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods described in the preceding claims.
Compared with the prior art, the invention has the beneficial effects that:
compared with the prior art, the storage synchronization method and device for the parameter change records of the power grid monitoring master station system overcome the problem that data cannot be updated in the fault of the centralized operation parameter change service of the power grid monitoring master station system, avoid discarding of operation parameter change requests in the on-duty node switching process, and improve the reliability of storage of operation parameters of the service end system of the power grid monitoring master station system. Meanwhile, the point-to-point synchronization method of the operation parameters of different nodes ensures the consistency of the operation parameters of the power grid system.
Drawings
FIG. 1 is a flow chart of a method for storing an implementation parameter change record according to the present invention;
FIG. 2 is an exemplary diagram of a change root hash calculation process in accordance with the present invention;
FIG. 3 is a block diagram illustrating a change log in accordance with the present invention;
FIG. 4 is a diagram illustrating a short variation of the chain length of a change log block according to the present invention;
FIG. 5 is a diagram illustrating a change log blockchain conflict synchronization in accordance with the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for more clearly illustrating the technical aspects of the present invention, and are not intended to limit the scope of the present invention.
Example 1
The embodiment introduces a storage synchronization method and a device for parameter change records of a power grid monitoring master station system, and the method comprises the following steps:
the service node applied to the power grid monitoring master station comprises the following components:
receiving parameter change information of equipment operation sent by a client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to a permission database, and checking whether the user has the permission for modifying and setting the equipment parameters;
after confirming that the user is qualified, identifying parameter change information, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, request time, a father block hash value, a random number and workload certification information;
the service node N for completing the assembly of the block head broadcasts the whole block information, other service nodes verify the validity of the block after receiving the information, and if the block is valid, the service node N is added into a local latest block chain; and according to the parameter change record information in the block, changing the parameters in the local equipment library, after finishing the change, replying confirmation information to the sending node N, and after receiving more than half of node confirmation, updating the parameter change in the local equipment library by the node N.
According to the storage synchronization method for the parameter change records of the power grid monitoring master station system, the storage method for the equipment operation parameter change records is that the equipment operation parameter change records are organized in a block mode, and the equipment operation parameter change records are stored in a block chain mode in a distributed power grid monitoring master station server. The process of storing the parameter change record is shown in fig. 1, and the application process specifically involves the following steps:
step 1, a client user initiates a device operation parameter change request, and an organization contains a user mark, a request time, a device unique code, a device parameter name, a parameter before device change and complete request information of a parameter after device change, wherein the request information can contain one or more groups of parameter change records consisting of operation time, the device unique code, the device parameter name and parameter values before device change and after device change. And the client side broadcasts the organized request information to all service nodes of the power grid monitoring master station side.
And 2, after each service node of the power grid monitoring master station receives the request of the client, firstly analyzing the user mark of the client, checking the existence of the user according to the authority database, and checking whether the user has the authority for modifying and changing the equipment parameters.
Step 3, after confirming that the parameter change request user is qualified, the service node at the master station further identifies change information such as each group of operation time, equipment unique code, equipment parameter name, equipment parameter before change, equipment parameter after change and the like, calculates a hash value for each group of change information, further calculates new hash values for the hash values of two adjacent groups, calculates hash values layer by layer in a binary tree mode, and finally calculates a root hash value of a binary tree. The process of specifically calculating the root hash value is shown in fig. 2: firstly, a SHA256 hash algorithm is adopted for each change record (the hash algorithm is a method for creating small digital codes from any data, wherein the SHA256 hash algorithm can generate a hash value with 256 bits for any length of information), a hash value with fixed 256 bits is generated for each change record information, a leaf layer L1 of a binary tree is formed, then a new hash value is calculated according to two adjacent sets of hash values input into the SHA256 hash algorithm, if a single hash value exists, a copy is copied by itself, and then the hash value is calculated by inputting the hash algorithm, so that a second layer L2 of the binary tree is formed. And so on to finally calculate the hash value of the highest layer of the binary tree, namely the root hash value. The root hash value thus calculated can ensure the order of changing the information, and any manipulation of falsifying the change order or illegally adjusting the change order can be identified.
And 4, the master station end service node takes the calculated root hash value as a part of information of the block header, and the block header comprises a user mark, a request time, a father block hash value, a random number and workload certification information, as shown in fig. 3. Wherein the random number and the workload certification information are for the other nodes to authenticate the validity of the workload of the block. Method and process for workload certification: the method is characterized in that a state estimation calculation method special for the power grid monitoring master station system is adopted (the state estimation calculation can be performed according to power grid equipment section data and a power grid model, and a state estimation value of each equipment is obtained after matrix calculation). And acquiring a data section of corresponding time according to the request time, calculating a state estimation process by combining a power grid structure of the equipment model library, and taking a power value of a circuit table and a position corresponding to the random number in a calculation result as workload proving information. The random number is an unsigned integer, if the random number is larger than the number of the line devices, the line devices are subjected to modular operation, an integer smaller than the number of the line devices is obtained, and then the power value of the corresponding position of the value in the line table is obtained and is used as a workload proof to be placed in the block head.
Step 5, the master station end service node (node N for short) completes the assembly of the block header, and constructs the parameter change record and the block header together into a complete parameter change record block, and the structural information of the block is shown in fig. 3. After the block is assembled, the node broadcasts the whole block information, and other service nodes verify the validity of the block after receiving the information, and if the block is valid, the node is linked with the local block chain. And according to the parameter change information in the block, completing the change of the parameters in the local equipment library, after completing the change, and sending a confirmation message back to the node N, and after receiving more than half of the node confirmation, updating the change of the parameters in the local equipment library by the node N. The specific procedure of the broadcast processing mechanism of the node N is described as follows: (1) The node N issues block information, other service nodes calculate root hash values according to the received change record information in the block body and the method in step 3, and the root hash values in the block header information are compared to verify the validity of parameter change information; (2) The other service nodes further acquire data sections according to the request time in the block head and calculate a state estimation value once by combining with the power grid structure of the equipment model library, further acquire the numerical value of the corresponding position of the corresponding line table and the random number according to the random number in the block head, compare the numerical value with the workload proof information provided in the block head, and consider that the workload proof is valid if the numerical values are consistent, namely the block is valid; (3) And finally, the other service nodes compare the hash value of the father block in the block header with the hash value of the local father block, link the latest block received this time with the local block chain if the hash value of the father block is consistent, and simultaneously reply the confirmation information to the transmitting node N.
The invention provides a storage synchronization method of a distributed power grid monitoring master station system parameter change record, wherein the synchronization method of the equipment operation parameter change record comprises the following steps: any two service nodes of the distributed power grid monitoring master station system can synchronize the parameter change block chains. The synchronization method is as follows:
(1) If the two serving nodes differ in local blockchain length and a long block contains a short blockchain, then the blockchain short node automatically synchronizes the missing blocks from the blockchain-length nodes. As shown in fig. 4, the parameter change blockchain in the node a sequentially includes (block 1, block 2, block 3), the parameter change blockchain in the node B sequentially includes (block 1, block 2, block 3, block 4), the blockchain length of the node B is longer than the blockchain length of the node a, and the blockchain of the node a is included, the blockchain of the node a automatically synchronizes from the synchronous block 4 of the node B;
(2) If two node parameter change block chains are bifurcated, namely, some father blocks in the two block chains are identical, two nodes broadcast a block synchronization request from the first block with bifurcation, the block with more than half of recovery confirmation is considered as an effective block, and the other invalid block is automatically synchronized by the effective block. As shown in fig. 5, the parameter change blockchains in the node C sequentially include (block 1, block 2, block 3, block 5), the parameter change blockchains in the node D sequentially include (block 1, block 2, block 3, block 4), the two blockchains of the node C and the node D collide in the 4 th block, the node C and the node D distribute and send broadcast information to confirm the 4 th block, and if more than half of the nodes confirm that the block 5 is valid, the node D synchronizes the block 5 from the node C into the local blockchain.
By the synchronization method, the same change block chain of all service node parameters in the whole network can be ensured. Therefore, the consistency of the operation parameters of the power grid monitoring system equipment is ensured, meanwhile, the point-to-point synchronous parameter change record between any two service nodes can be avoided, and the problems of single-node faults in centralized updating and loss of parameter change setting in the primary and standby switching process can be avoided.
Example 2
The embodiment provides a storage synchronization device of a parameter change record of a power grid monitoring master station system, which is applied to a service node of a power grid monitoring master station end and comprises the following components:
the parameter change information receiving unit is used for receiving parameter change information of equipment operation sent by the client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
the parameter change information analysis and verification unit is used for analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to the authority database, and verifying whether the user has the authority for modifying and setting the equipment parameters;
the parameter change information identification unit is used for identifying parameter change information after confirming that the user is qualified, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
the input unit is used for taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, a request time, a father block hash value, a random number and workload certification information;
the updating unit is used for completing the service node N of the block head assembly, broadcasting the whole block information, verifying the validity of the block after other service nodes receive the block information, and adding the block into a local latest block chain if the block is valid; and according to the parameter change record information in the block, changing the parameters in the local equipment library, after finishing the change, replying confirmation information to the sending node N, and after receiving more than half of node confirmation, updating the parameter change in the local equipment library by the node N.
Example 3
The embodiment provides a storage synchronization device for parameter change records of a power grid monitoring master station system, which comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor is operative according to the instructions to perform the steps of the method according to any one of embodiment 1.
Example 4
The present embodiment provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of any of embodiment 1.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (7)

1. The storage synchronization method for the parameter change records of the power grid monitoring master station system is characterized by being applied to a service node of a power grid monitoring master station end and comprising the following steps:
receiving parameter change information of equipment operation sent by a client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to a permission database, and checking whether the user has the permission for modifying and setting the equipment parameters;
after confirming that the user is qualified, identifying parameter change information, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, request time, a father block hash value, a random number and workload certification information;
the service node N for completing the assembly of the block head broadcasts the whole block information, other service nodes verify the validity of the block after receiving the information, and if the block is valid, the service node N is added into a local latest block chain; the parameters in the local equipment library are changed according to the parameter change record information in the block, confirmation information is returned to the sending node N after the change is finished, and after the node N receives more than half of node confirmation, the parameters in the local equipment library are updated;
the parameter change information includes: user mark, request time, device unique code, device parameter name, parameter value before device change, complete request information of parameter value after device change;
the complete request information comprises one or more groups of operation time, equipment unique codes, equipment parameter names and change records of parameters before and after equipment change;
the service node N for completing the block header assembly broadcasts the whole block information, and after other service nodes receive the information, the service node N verifies the validity of the block, if the block is valid, the service node N is added into a local latest block chain, and the service node N comprises the following steps:
after the service node which completes the assembly issues the block information, other service nodes calculate root hash values according to the received change record information in the block body, compare the root hash values with the root hash values in the block header information, and verify the validity of the parameter change information;
acquiring a data section according to the request time in the block head, calculating a state estimation value by combining with a power grid structure of an equipment model library, further acquiring a numerical value in a random number position of a corresponding circuit table according to the random number in the block head, comparing the numerical value with the work load proving information in the block head, and considering that the work load proving is effective if the numerical values are consistent;
and comparing the hash value of the parent block in the block header with the hash value of the local parent block, if the hash value of the parent block is consistent with the hash value of the local parent block, linking the received parameter change block with the local block, and simultaneously replying confirmation information to a sending node assembled by the blocks.
2. The method for synchronizing the storage of the parameter change records of the power grid monitoring master station system according to claim 1, wherein the method comprises the following steps of: any two service nodes in the power grid monitoring master station system can synchronize parameter change record block chains, and the synchronization mode is divided into two cases:
the two node parameters change the lengths of the blockchains to be different, and the long chain comprises a short chain, so that the lengths of local blockchains of the two service nodes are compared, and the nodes with the chain lengths are automatically synchronized from the nodes with the chain lengths to the nodes with the short blockchains;
if the two node parameter change blockchains are bifurcated, that is, some parent blocks in the two blockchains are identical, the two nodes broadcast a difference block synchronization request from the first divergence difference block, and the blocks with more than half of recovery confirmation are considered as effective blocks, and the other invalid block is automatically synchronized by the effective blocks.
3. The method for synchronizing the storage of the parameter change records of the power grid monitoring master station system according to claim 1, wherein the method comprises the following steps of: the method for calculating the hash value aiming at each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree according to a binary tree mode comprises the following steps:
generating a hash value with a fixed 256-bit length for each group of change information by adopting an SHA256 hash algorithm aiming at each group of change to form a leaf layer L1 of a binary tree;
according to two adjacent hash values, inputting the hash value into an SHA256 hash algorithm to calculate a new hash value, if a single hash value exists, copying the hash value, and inputting the hash algorithm to calculate the new hash value, so that a second layer L2 of the binary tree is formed;
and finally calculating the root hash value of the highest layer of the binary tree by analogy.
4. The method for synchronizing the storage of the parameter change records of the power grid monitoring master station system according to claim 1, wherein the method comprises the following steps of: the method for acquiring the workload certification information comprises the following steps:
calculating a primary state estimation by adopting a state estimation calculation method special for a power grid monitoring master station according to a data section of the request time and combining a power grid structure of an equipment model library;
taking the power value of the position corresponding to the random number in the circuit table in the calculation result as the work load proving information; the random number is an unsigned integer, if the random number is larger than the number of the line devices, the line devices are subjected to modular calculation to obtain an integer smaller than the number of the line devices, and then the power value of the position corresponding to the numerical value in the line table is obtained.
5. The utility model provides a storage synchronizer of electric wire netting monitoring master station system parameter change record which characterized in that is applied to electric wire netting monitoring master station end service node, includes:
the parameter change information receiving unit is used for receiving parameter change information of equipment operation sent by the client; the client is used for receiving a user-initiated equipment operation parameter change request and organizing parameter change information;
the parameter change information analysis and verification unit is used for analyzing the parameter change information, analyzing a client user mark, checking the existence of a user according to the authority database, and verifying whether the user has the authority for modifying and setting the equipment parameters;
the parameter change information identification unit is used for identifying parameter change information after confirming that the user is qualified, calculating hash values for each group of change information, further calculating new hash values for the hash values of two adjacent groups, and finally calculating a root hash value of a binary tree in a binary tree mode;
the input unit is used for taking the calculated root hash value as a part of information of a block header, wherein the block header comprises a user mark, a request time, a father block hash value, a random number and workload certification information;
the updating unit is used for completing the service node N of the block head assembly, broadcasting the whole block information, verifying the validity of the block after other service nodes receive the block information, and adding the block into a local latest block chain if the block is valid; the parameters in the local equipment library are changed according to the parameter change record information in the block, confirmation information is returned to the sending node N after the change is finished, and after the node N receives more than half of node confirmation, the parameters in the local equipment library are updated;
the parameter change information includes: user mark, request time, device unique code, device parameter name, parameter value before device change, complete request information of parameter value after device change;
the complete request information comprises one or more groups of operation time, equipment unique codes, equipment parameter names and change records of parameters before and after equipment change;
in the updating unit, the service node N that completes the assembly of the block header broadcasts the entire block information, and after other service nodes receive the information, verifies the validity of the block, and if the block is valid, the service node N adds the block to the local latest block chain, including:
after the service node which completes the assembly issues the block information, other service nodes calculate root hash values according to the received change record information in the block body, compare the root hash values with the root hash values in the block header information, and verify the validity of the parameter change information;
acquiring a data section according to the request time in the block head, calculating a state estimation value by combining with a power grid structure of an equipment model library, further acquiring a numerical value in a random number position of a corresponding circuit table according to the random number in the block head, comparing the numerical value with the work load proving information in the block head, and considering that the work load proving is effective if the numerical values are consistent;
and comparing the hash value of the parent block in the block header with the hash value of the local parent block, if the hash value of the parent block is consistent with the hash value of the local parent block, linking the received parameter change block with the local block, and simultaneously replying confirmation information to a sending node assembled by the blocks.
6. The utility model provides a storage synchronizer of electric wire netting monitoring master station system parameter change record which characterized in that: comprises a processor and a storage medium;
the storage medium is used for storing instructions;
the processor being operative according to the instructions to perform the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized by: the program, when executed by a processor, implements the steps of the method of any of claims 1 to 4.
CN202210151351.7A 2022-02-18 2022-02-18 Storage synchronization method and device for parameter change records of power grid monitoring master station system Active CN114661231B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210151351.7A CN114661231B (en) 2022-02-18 2022-02-18 Storage synchronization method and device for parameter change records of power grid monitoring master station system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210151351.7A CN114661231B (en) 2022-02-18 2022-02-18 Storage synchronization method and device for parameter change records of power grid monitoring master station system

Publications (2)

Publication Number Publication Date
CN114661231A CN114661231A (en) 2022-06-24
CN114661231B true CN114661231B (en) 2023-08-11

Family

ID=82027530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210151351.7A Active CN114661231B (en) 2022-02-18 2022-02-18 Storage synchronization method and device for parameter change records of power grid monitoring master station system

Country Status (1)

Country Link
CN (1) CN114661231B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115658357A (en) * 2022-09-30 2023-01-31 蚂蚁区块链科技(上海)有限公司 Method and apparatus for replaying blockchain transactions

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959307A (en) * 2016-06-30 2016-09-21 中国科学院计算技术研究所 Existence certification and authentication service method and system based on block chain technology
WO2018032372A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Trusted power grid transaction platform based on block chain technology
CN107870996A (en) * 2017-11-02 2018-04-03 国家电网公司 Electricity transaction management-control method and device based on block chain
CN110928690A (en) * 2019-12-07 2020-03-27 上海科乐宜信息科技有限公司 Method for synchronizing and verifying block chain data in 5G network environment
CN112231754A (en) * 2020-10-21 2021-01-15 南方电网科学研究院有限责任公司 Method, system and storage medium for monitoring configuration information of power edge computing node
WO2021072981A1 (en) * 2019-10-17 2021-04-22 广东绿腾新能源服务有限公司 Blockchain-based energy data linking method and apparatus
CN113036756A (en) * 2021-03-15 2021-06-25 四川电力设计咨询有限责任公司 Networking system and method for decentralized networking of micro-grid

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105959307A (en) * 2016-06-30 2016-09-21 中国科学院计算技术研究所 Existence certification and authentication service method and system based on block chain technology
WO2018032372A1 (en) * 2016-08-13 2018-02-22 深圳市樊溪电子有限公司 Trusted power grid transaction platform based on block chain technology
CN107870996A (en) * 2017-11-02 2018-04-03 国家电网公司 Electricity transaction management-control method and device based on block chain
WO2021072981A1 (en) * 2019-10-17 2021-04-22 广东绿腾新能源服务有限公司 Blockchain-based energy data linking method and apparatus
CN110928690A (en) * 2019-12-07 2020-03-27 上海科乐宜信息科技有限公司 Method for synchronizing and verifying block chain data in 5G network environment
CN112231754A (en) * 2020-10-21 2021-01-15 南方电网科学研究院有限责任公司 Method, system and storage medium for monitoring configuration information of power edge computing node
CN113036756A (en) * 2021-03-15 2021-06-25 四川电力设计咨询有限责任公司 Networking system and method for decentralized networking of micro-grid

Also Published As

Publication number Publication date
CN114661231A (en) 2022-06-24

Similar Documents

Publication Publication Date Title
CN108282474B (en) Block chain based digital asset transaction consistency maintenance method
CN109246194B (en) Practical Byzantine fault-tolerant block chain consensus method and system based on multiple leader nodes
Starobinski et al. Efficient PDA synchronization
CN110825420B (en) Method, device, equipment and storage medium for updating configuration parameters of distributed cluster
WO2014101424A1 (en) Method and system for synchronizing distributed database
CN110784495B (en) Block chain-based discovery and configuration information management method for big data cluster system
EP3480686B1 (en) Data processing method, cluster manager, resource manager and data processing system
CN111614733B (en) Deployment method, device and storage medium of distributed multi-fragmentation cluster
CN106886410A (en) A kind of software version management system
CN109918229B (en) Database cluster copy construction method and device in non-log mode
CN111259072B (en) Data synchronization method, device, electronic equipment and computer readable storage medium
CN114661231B (en) Storage synchronization method and device for parameter change records of power grid monitoring master station system
CN114050904B (en) Consensus system and method based on two-level leader node fragmentation structure
CN111414426A (en) Data processing method and system based on block chain
CN111314060A (en) Key updating method, device and storage medium
CN111679978B (en) Program testing method, program testing device, electronic equipment and storage medium
CN115695449A (en) Block chain digital collection source file cross-platform synchronization and transfer method
CN114490685A (en) DNS data query updating method and system based on block chain and verifiable calculation
CN115134086A (en) Method and device for dynamic committee secret sharing and updating of asynchronous network
CN111277627A (en) Consensus mechanism based on contribution amount weight certification
CN102761520B (en) Method and system for processing authentication information
CN101841425A (en) Network backup method, device and system without proxy
US7454402B2 (en) Method for replication tracing
CN114499874B (en) Bayesian-busy-family fault-tolerant consensus optimization method applied to industrial Internet
US20100268784A1 (en) Data synchronization system and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant