CN117527183A - Power data-oriented decentralization sharing and cross-chain computing method and system - Google Patents

Power data-oriented decentralization sharing and cross-chain computing method and system Download PDF

Info

Publication number
CN117527183A
CN117527183A CN202311515093.7A CN202311515093A CN117527183A CN 117527183 A CN117527183 A CN 117527183A CN 202311515093 A CN202311515093 A CN 202311515093A CN 117527183 A CN117527183 A CN 117527183A
Authority
CN
China
Prior art keywords
power data
data
node
chain
alliance chain
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.)
Pending
Application number
CN202311515093.7A
Other languages
Chinese (zh)
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.)
University of Jinan
Original Assignee
University of Jinan
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 University of Jinan filed Critical University of Jinan
Priority to CN202311515093.7A priority Critical patent/CN117527183A/en
Publication of CN117527183A publication Critical patent/CN117527183A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • G06F21/645Protecting data integrity, e.g. using checksums, certificates or signatures using a third party
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0863Generation of secret information including derivation or calculation of cryptographic keys or passwords involving passwords or one-time passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/088Usage controlling of secret information, e.g. techniques for restricting cryptographic keys to pre-authorized uses, different access levels, validity of crypto-period, different key- or password length, or different strong and weak cryptographic algorithms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Medical Informatics (AREA)
  • Bioethics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Power Engineering (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of blockchain and machine learning, and provides a decentralization sharing and cross-chain computing method and system for power data. In the method, intelligent Internet of things equipment is used for collecting power data in a first part, an IPFS system is used for storing the power data in combination with a alliance blockchain, and the privacy of the data is guaranteed in combination with homomorphic encryption technology. The collection and storage of the power data are completed in the above manner. And the conversion of the ciphertext data acquisition right is completed by adopting a proxy re-encryption technology, and the sharing of the power data to the local client nodes in the training alliance chain is completed by utilizing a notary node-based cross-chain technology and a data alliance chain. In the second part, active local model updates are selected and local model updates are uplinked. And (3) global model aggregation is completed through an aggregation alliance chain, and node reputation information is uplink and simultaneously fed back to the power data center.

Description

Power data-oriented decentralization sharing and cross-chain computing method and system
Technical Field
The invention relates to the technical field of blockchain and machine learning, in particular to a decentralization sharing and cross-chain computing method and system for power data.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
With the progress of social science and technology and the development of informatization construction of smart grids, the demand of society for electricity consumption is rapidly increased, so that massive electric power data are generated. The obtained electric power data have extremely high value, and can promote an electric power mechanism to make a better electric quantity transmission plan for a region and optimize the management operation strategy of a power grid. And the system can be shared with other domain institutions in the application process, and multi-direction data calculation and analysis can be performed by combining data in other domain institutions, so that the power data can play a greater value.
At present, experience on how to perform data sharing and privacy calculation on power data is little, and a complete architecture is not formed. Thus limiting the overall power data flow and application feasibility.
The main appearance is that: the sharing of the power data lacks a confirmation mechanism, the power data lacks applicability in the circulation process, the power data is stored and shared safely, the data sharing generated in the calculation process is inconvenient, the circulation is poor, privacy disclosure, limited expandability caused by the adoption of a single blockchain network in the training analysis calculation process of a large-scale model of power data, dishonest aggregation of federal client node local model training and node global model aggregation, single-point fault of a traditional central server and the like.
Disclosure of Invention
In order to solve the technical problems in the background art, the invention provides a decentralization sharing and cross-chain computing method and system for power data. The value of the electric power data in the aspect of applicability is ensured to be maximally embodied through a federal learning mode.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the first aspect of the invention provides a power data-oriented decentralization sharing and cross-chain computing method.
A power data-oriented decentralization sharing and cross-chain computing method comprises the following steps:
the power data center encrypts the collected power data, uploads the encrypted power data to the IPFS system, and uploads the file fingerprint hash value to the data alliance chain; the file fingerprint hash value is a file fingerprint hash value of the encrypted power data calculated by the IPFS system;
each data demand in the training alliance chain sends a power data request and a public key PK of the power data center;
the electric power data center generates a proxy re-encryption key RK by utilizing a private key SK of the electric power data center and a public key PK of a data requiring party, and provides an electric power data request and the proxy re-encryption key RK for a first notary node;
the first notary node verifies the correctness of the power data requirement according to the file fingerprint hash value downloaded from the data alliance chain; the agent re-encryption key RK is adopted to carry out secondary encryption on the encrypted power data downloaded from the IPFS system, and the secondary encrypted power data is sent to a data demand party in a training alliance chain, so that the data demand party uses a private key of the data demand party to decrypt the secondary encrypted power data, and the encrypted power data is obtained;
training a local model by using the encrypted power data by a data demand party in the training alliance chain, generating reputation opinions for the data demand party after the local model is updated, and transmitting the local model update and the reputation opinions to the aggregation alliance chain; so that the aggregate federation chain transmits the reputation opinion to the power data center;
the power data center sends the reputation opinion and the new round of power data request of the data demander to the first notary node so that the first notary node can choose to agree or reject the request of the data demander according to the identity information of the data demander and the reputation opinion of the previous round.
Further, the process of encrypting the collected power data by the power data center comprises the following steps: and the electric power data center encrypts the collected electric power data by adopting a homomorphic encryption algorithm.
Further, the election process of the first notary node includes:
ranking the credit of each node in the data alliance chain, the training alliance chain and the aggregation alliance chain, and screening nodes with credit values higher than a set threshold value to form a notary node group to be selected;
according to the number of events served by nodes in the notary node group to be selected in the time interval T, the nodes in the notary node group to be selected are divided into a plurality of leader nodes and a plurality of common nodes, and the first notary node is selected from the plurality of leader nodes.
Further, the process of sending the power data request and the public key PK of the power data center by each data demand in the training alliance chain includes:
each data demand party generates public and private key pairs, namely KeyGen (P) → { PK i ,SK i -and using its own private key SK i Signing the data request information R with a signature h=hash (R);
CA is against its public key PK i After authentication, the request R and public key PK are authenticated i To the power data center, powerData center verification public key PK i If H' =h=hash (R) is true, the comparison confirmation is a power data request sent by a certain data consumer.
Further, several second notary nodes are selected prior to training the local model, and valid local models are selected for updating by smart contracts.
Further, the process of generating reputation opinions includes: and the second notary node adopts a consensus algorithm to carry out broadcast verification on the updated effective local model, after verification, a new block storing the verified local model update is added into the distributed ledger, and after verification, the local model update is verified, reputation opinion is generated for the data demander.
Further, the second notary node sends the local model update and reputation to an aggregation alliance chain, nodes in the aggregation alliance chain update the global model according to a global model aggregation algorithm, the aggregation alliance chain feeds back the reputation of the data demand party to a third notary node according to the reputation of the data demand party, and the third notary node sends the reputation of the data demand party to the electric power data center; the third notary node is obtained by node election in the aggregation alliance chain.
Still further, the reputation comprises aggressiveness, contribution, timeliness, and stability.
Further, the aggressiveness includes a front aggressiveness H 1 And negative aggressiveness H 0
Wherein P represents the total number of node participation, P 1 Representing the positive participation times, P 0 Indicating the number of negative active participation;
still further, the contribution degree is:
wherein C is n Representing the contribution degree, L, of the node at the nth participation n-1 Representing losses at node n-1 participation, L n Representing a loss at the nth participation of the node;
further, the aging includes proving an aging T 1 And negative aging T 0
Wherein P is 1 Representing the positive participation times, P 0 Indicating the number of negative active participation times C n1 Represent positive contribution degree, C n0 Representing a negative contribution;
still further, the stability is:
wherein S represents node network stability, MTBF represents average fault interval time, MTTR represents average repair time, t (r) represents node total operation time, F represents failure times of the node, and t (m) represents node total maintenance time.
A second aspect of the invention provides a power data oriented decentralized sharing and cross-chain computing system.
An electric data-oriented decentralization sharing and cross-chain computing system comprises an electric data center, and an IPFS system, a first notary node, a data alliance chain, a training alliance chain and an aggregation alliance chain which are all in data interaction with the electric data center;
the power data center encrypts the collected power data and uploads the encrypted power data to the IPFS system;
the IPFS calculates a file fingerprint hash value of the encrypted power data and transmits the file fingerprint hash value back to the power data center;
the electric data center uploads the file fingerprint hash value to a data alliance chain;
each data demand in the training alliance chain sends a power data request and a public key PK of the power data center;
the electric power data center generates a proxy re-encryption key RK by utilizing a private key SK of the electric power data center and a public key PK of a data requiring party, and provides an electric power data request and the proxy re-encryption key RK for a first notary node;
the first notary node verifies the correctness of the power data requirement according to the file fingerprint hash value downloaded from the data alliance chain; and the encrypted power data downloaded from the IPFS system is secondarily encrypted using the proxy re-encryption key RK, and the secondarily encrypted power data is transmitted to the data demander in the training alliance chain,
the data demand party uses the private key of the data demand party to decrypt the secondary encrypted power data to obtain the encrypted power data;
training a local model by using the encrypted power data by a data demand party in the training alliance chain, generating reputation opinions for the data demand party after the local model is updated, and transmitting the local model update and the reputation opinions to the aggregation alliance chain;
the aggregation alliance chain sends the reputation comments to the power data center;
the electric power data center sends the reputation opinion and an electric power data request of a new round of data demander to a first notary node;
the first notary node selects to grant or deny the request of the data demander according to the identity information of the data demander and the reputation opinion of the previous round.
Compared with the prior art, the invention has the beneficial effects that:
the scheme of safely storing, sharing and calculating the power data is realized by combining a notary mechanism cross-chain technology, a cryptography technology and a federal learning technology based on external verification, can safely store and transmit mass power data collected by Internet of things equipment such as intelligent electric meters, and performs on-chain information sharing and calculating by combining the cross-chain technology and the federal learning technology.
The invention introduces a reputation feedback mechanism, and takes the node reputation as an important standard to be introduced into the processes of election, training and aggregation, so as to measure the reliability and credibility of notary nodes and client training nodes. The credit management mechanism can better elect notary nodes and management participants, ensure the quality of data submitted during model training, improve the accuracy of the model, and prevent malicious participants from attacking the system.
The invention can realize the decentralization by arranging and applying the electric data calculation task in the block chain network in the electric data sharing and calculating process, avoid the unreliability of the whole federation system caused by the fault of the central server, adopt the form of three alliance chains, and utilize the cross-chain technology to meet the requirement of a large amount of calculation resources in the process of training and aggregating large-scale models, thereby solving the problems of the decline of the performance, the increase of delay, the insufficient processing capacity, the limitation of expandability and the like of the single block chain network.
According to the invention, through electing a plurality of notary nodes to cooperatively circulate and calculate the power data among the alliance chains, risks can be avoided, and a more powerful, flexible and interconnected power data sharing and calculating system can be constructed, so that the requirements of different enterprises and institutions can be met. The scheme provides an effective solution for solving the interoperability problem between different alliance chains and improving the power data circulation performance, increasing the data sharing and reducing the risk by using a cross-chain technology.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is a flow chart of the power data oriented decentralization sharing and cross-chain computing method shown in the present invention.
Detailed Description
The invention will be further described with reference to the drawings and examples.
It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present invention. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
It is noted that the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by special purpose hardware-based systems which perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
Term interpretation:
1. the blockchain is an emerging decentralization storage technology, is an important research direction of distributed storage, and realizes decentralization, data tamper resistance and traceability characteristics by utilizing a distributed network architecture while data storage sharing under the condition of not introducing a third party, and the characteristics are suitable for application scenes of electric power data sharing and calculation. But at the same time, to avoid the burden of block chain storage, an interstellar file system (IPFS) is introduced, so that the chain up-link and down-link mixed storage can be realized. IPFS is a global peer-to-peer distributed file system that provides a platform for the management and distribution of large data.
2. Privacy calculation is a technical method in the fields of computer science and information security, and aims to furthest protect the privacy of users when processing and analyzing personal or sensitive data, thereby realizing the maximization of data value on the premise of ensuring the data security. The traditional data calculation and analysis method adopts machine learning to perform model training in a centralized way, so that training data is required to be concentrated on the same server, federal learning is one of common technologies in privacy calculation, is an emerging machine learning paradigm, is a special form of machine learning federation, performs joint modeling on data distributed in multi-party equipment under the condition of ensuring privacy, and is a method for performing data calculation and analysis across multiple equipment. However, the traditional federal learning framework still suffers from problems that affect federal learning reliability, single point failure is a possible threat in federal learning processes, in which a central server, commonly referred to as an aggregator, is employed to perform integration of local training results to facilitate global model updates, and then the aggregator is not always reliable, and once the centralized aggregator is destroyed, the whole federal learning system will fail. The notary mechanism-based cross-chain technology is a method technology for interoperating different block chains, solving the problems of data transmission, asset transfer and the like among different block chains, and ensuring the safety and the integrity of transmitted data by electing a public node to attach to different block chains to transmit information and verifying the validity and the correctness of cross-chain transactions.
3. The FISCO BCOS domestic alliance blockchain bottom platform: the FISCO BCOS is an open source enterprise-level blockchain platform that aims to provide highly customizable, secure and controllable blockchain solutions for enterprises and organizations. The system has wide customization and flexibility, and can meet the requirements of a plurality of fields such as finance, a supply chain, the Internet of things, government and the like. The platform allows users to customize rights and privacy settings as needed, thereby ensuring that only authorized participants can access and operate the blockchain network. The platform supports intelligent contract development, and users can create intelligent contracts using a solubility or other supported programming language that can be used to automate the execution of various business logic. The platform also has the characteristic of high performance, supports high throughput and low delay, and can process a large amount of transactions and data. The platform supports transverse expansion, can dynamically expand network capacity according to requirements so as to adapt to ever-increasing transaction amount and data, and provides a multi-level privacy protection mechanism which comprises technologies such as zero knowledge proof, federal learning and the like so as to ensure that sensitive data of participants are protected. The platform is widely used in the financial industry, government projects, and other fields where secure and trusted blockchain solutions are needed.
4. FedAVG Federal learning framework: fedAVG is a federal learning framework, aimed at solving the problems of decentralized data and privacy protection. FedAVG only performs local training on local equipment, and then aggregates the update parameters of the local model into a global model, which means that the original data is always left locally and cannot be concentrated on a central server, thereby protecting the privacy of users. Different from the traditional centralized training mode, fedAVG only needs to transmit the parameter update of the local model, and does not need to transmit the original data, thereby greatly reducing the data transmission quantity and reducing the communication cost and delay. Federal learning allows training on a decentralized data source without the need to concentrate the data in one place, which allows organizations, devices, or individuals to collaboratively train a global model without sharing the data. FedAVG can accommodate various types of devices, including mobile devices, embedded devices, and cloud servers, because model updates are performed locally, without requiring powerful computing resources. Because the federal learning framework enables the model to train on a plurality of devices, the model can be better suitable for various devices and data distribution, and the universality and the robustness of the model are improved. The federal learning framework can be easily expanded to large-scale participants, and is suitable for various application scenes, including medical treatment, finance, the Internet of things and the like.
Example 1
The embodiment provides a power data-oriented decentralization sharing and cross-chain computing method.
The embodiment designs two parts, the first part is a power data acquisition and sharing stage, and the second part is a power data application and calculation stage. In the first part, intelligent Internet of things equipment is used for collecting power data, an interstellar file system (IPFS) is used for storing the power data in combination with a alliance blockchain, and the privacy of the data is ensured in combination with homomorphic encryption technology. The collection and storage of the power data are completed in the above manner. And the conversion of the ciphertext data acquisition right is completed by adopting a proxy re-encryption technology, and the sharing of the power data to the local client nodes in the training alliance chain is completed by utilizing a notary node-based cross-chain technology and a data alliance chain. In the second part, a reputation-based node selection algorithm and a Bayesian fault tolerance algorithm are used to select valid local model updates and local model updates are uplink. And (3) global model aggregation is completed through an aggregation alliance chain, and node reputation information is uplink and simultaneously fed back to the power data center. In this way, power data calculation is performed.
As shown in fig. 1, the specific steps are as follows:
a first part: electric power data acquisition and sharing stage:
1. users in a region perform power data collection by using internet of things devices such as smart meters and the like, and then transmit the power data to a power data center.
2. The power data center encrypts the collected power data by using a modified homomorphic encryption algorithm and uploads the encrypted power data to an IPFS in the distributed cluster storage system, where a file fingerprint hash value corresponding to the encrypted data is calculated and generated. And uploading the returned file fingerprint hash value to a data alliance chain by the power data center, so that reliable storage and traceable access for guaranteeing data integrity are realized.
3. Each data consumer (federal client) in the training federation chain sends a power data request with the authority of the CA and provides a respective node public key PK, and the power data center verifies the identity information of the data consumer.
4. The power data center generates a proxy re-encryption key RK using its own private key SK and a public key PK provided by the data consumer node, and provides the demand node request information and the proxy re-encryption key RK to the notary node 1.
5. The notary node 1 requests a file fingerprint hash value from the data alliance chain through a data request smart contract and downloads the file fingerprint hash value.
6. The notary node 1 downloads corresponding encrypted power data through the file fingerprint, calculates a hash value of the encrypted power data and compares the hash value with the file fingerprint hash value obtained from the data alliance chain to confirm that the required data is correct.
7. The notary node 1 uses the proxy re-encryption key RK to secondarily encrypt the power data, and transmits the secondarily encrypted power data to the data demander node in the training alliance chain.
8. The data consumer node (i.e., the federal client) decrypts the encrypted power data using its own private key SK.
The detailed steps of the implementation of the part are as follows:
1、the PC (power data center) executes a power data encryption algorithm, PKeyGen: two large primes p and q are randomly selected, the public key n=pq is calculated, the least common multiple of p-1 and q-1, i.e. λ=lcm (p-1, q-1), the private key b=λ is calculated -1 mod (n). Pecrypt: selecting a plurality of random numbers r before encryption and then performing a pre-operation r n mod(n 2 ) Only some r need be selected randomly in the encryption process n mod(n 2 ) Encryption of plaintext electric power data M, i.e., CT= (1+Mn) r n mod(n 2 ) The encryption process is as follows:
2. uploading the encrypted ciphertext power data to an interplanetary file system (IPFS), calculating and generating a hash value corresponding to the ciphertext power data, returning a file fingerprint hash value, and uploading the file fingerprint hash value to a data alliance chain.
3. The data uploading record of the power data, the request record of the client request node and the ciphertext hash value returned by the IPFS are all recorded on the blockchain as transaction data. Based on the traceability of the blockchain, data audit and user non-repudiation can be realized, and in order to ensure consistency of the blockdata, a proper consensus mechanism needs to be selected so as to ensure smooth generation of the blocks and reduce communication delay of a blockchain platform. The PBFT consensus algorithm is often applied to a alliance chain because of the characteristics of high throughput, low transaction delay, tolerance of Bayesian error and the like, so the scheme selects the PBFT algorithm as a consensus mechanism of a block chain platform. The consensus process is divided into three phases, first the Pre-preparation phase: the master node sends the proposal to the backup node, packages the block, encapsulates the new block in the preparation packet and broadcasts the preparation packet to other nodes. After receiving the packet, other nodes execute the block and broadcast the signature packet. Then the preparation phase: after the other nodes collect the full 2f+1 signature packets, the other nodes are broadcasted with the Commit request. Finally, the Commit phase: after the other nodes collect 2f+1 Commit requests, the blocks are written into the data, and the client node knows that the consensus is achieved at this time, so that the corresponding requests can be safely executed.
4. Notary node election: notary nodes are generated by node elections in the alliance chains, and partial high-reputation nodes are selected from all the alliance chains participating in cross chains according to the node reputation ranks to form a notary node group { N to be selected 1 ,N 2 ,……N S And dividing the nodes in the notary node group to be selected into a plurality of leading nodes and a plurality of common nodes according to the number of events served by the nodes in the notary node group to be selected in the time interval T. A common node may become a leader node by increasing the number of events it serves. Only the leader node may be elected as a notary node.
5. The client node sends data request information: the client node generates a public and private key pair, namely KeyGen (P) → { PK i ,SK i -and using its own private key SK i Signing the data request information R with h=hash (R), and then CA (certificate authority) signs its public key PK i After authentication, the request R and public key PK are authenticated i And the data is transmitted to the power data center, the power data center verifies the authenticity of the public key, and whether H' =H=hash (R) contrast confirmation is data request information sent by a certain client node is calculated.
6. The electric data center uses the private key SK of the electric data center p And public key PK of client node i And carrying out operation to generate a re-encryption key RK, and transmitting the re-encryption key and data request information to the notary node. And (3) key generation: inputting global parameter P, client node public key PK i Private key SK of electric power data center p The output proxy re-encryption keys RK, RKey Gen (P, PK) i ,SK p )→{RK}
7. The notary node requests a power data fingerprint hash value and downloads ciphertext power data:
8. the notary node encrypts the ciphertext power data using the re-encryption key and then transmits to the demand client node: RECryption (P, RK. FileCT) → { C (FileCT) }, and
9. the client node uses its own private key SK i Decryption ciphertext C i Obtaining dense power data Dec (PSK) i ,C i )→{FileCT}。
A second part: power data application and calculation phase:
when the client of the federation learning is a node of the blockchain, we define the federation learning framework as a fully embedded federation learning framework, that is, the blockchain node (client) not only trains the local model, but also validates updates and generates new blocks. The federation training mode is decentralised, the local training and the global model aggregation are in a double-federation chain mode, each node in the federation chain has the opportunity to participate in the local model training and the global model training, and therefore the aggregation federation chain can play the role of a central aggregation server. Training data generated during the training process, including the validated local model updates and global model updates, are stored in the corresponding blockchain network distributed ledgers.
1. The nodes (client nodes) in the training federation chain have acquired the encrypted power data, then local training is performed at the nodes, and the local training is updated to the local model.
2. Before uploading the local model update, several honest client nodes (notary node 2) are selected to select the effective local model update through intelligent contracts, so that a low-precision model is abandoned, thereby laying a foundation for later high-quality aggregation of global models.
3. And broadcasting and verifying the approved local model update by the selected client node through a consensus algorithm, adding a new block storing the verified model update into the distributed ledger, and generating reputation opinion for the node after the node verifies the local model update.
Wherein, the definition of the new area block is as follows: 1. the hash value of the previous block is included in the new block to ensure the link between the blocks. 2. A new timestamp is generated to identify the time at which the new zone was created. Once a node successfully creates a new block, it is broadcast to the entire network, where it trains the federated chain network, each node receives and validates the block, and after validation, the new zone is added to the blockchain.
Distributed ledgers are a decentralized database technology for sharing, storing and synchronizing data among multiple nodes, typically in the form of blockchains.
4. The validated local updates are collected by client nodes selected by a reputation based node selection algorithm. These verified local model updates and generated reputation opinions are then uploaded by the notary node 2 into an aggregated federation chain, the nodes in which update the global model according to the global model aggregation algorithm and feed back to the notary node 3 according to the client node's reputation opinion. And (5) carrying out power data analysis by using the updated global model.
5. The notary node 3 in the aggregate alliance chain transmits information of malicious or dishonest client nodes to the power grid data processing center, and the power data center transmits the information to the notary node 1 together with data request information transmitted by the client nodes in the new training alliance chain.
6. Notary node 1 receives the authenticated client node identity information and compares reputation ideas generated by the previous round of verifying the client to selectively agree to or reject the node's request.
7. The power data sharing and calculation process in this mode is performed repeatedly.
The detailed steps of the implementation of the part are as follows:
1. the client nodes are based on the encrypted power data Dec (PSK i ,C i ) Combined modeling training data → { FileCT }:
2. a suitable honest working node training and aggregation model needs to be selected through reputation calculation, and the scheme node reputation score is mainly influenced by four factors: aggressiveness, contribution degree, timeliness and stability. The node enthusiasm is expressed by H, the higher the enthusiasm is, the more the interaction is participated, and the enthusiasm is divided into the positive enthusiasm H 1 And negative aggressiveness H 0 The formula is as follows:p represents the total number of node participation, P 1 Representing the positive participation times, P 0 Indicating the number of negative active participation. The contribution degree is represented by C, and the loss of the model before and after the nth participation training is respectively represented as L n-1 And L n The contribution of the node at the nth participation is expressed as follows: />If the molecule is greater than 0, C n >0, which indicates that model loss is reduced, the node contributes positively. Conversely C n <0, i.e. the node contributes negatively. Timeliness is represented by T, training is continuously changed, models are continuously updated, and model accuracy contributes to reputation as time continues
The time varies, and the contribution degree closer to the current time is considered to occupy higher weight, namely the following expression is adopted:
wherein T is c Is the current time, T n Is the nth time the local model is shared. Timeliness is also divided into positive and negative timeliness, expressed as follows:/>and->Wherein C is n1 And C n0 Representing positive contribution and negative contribution. S represents node network stability, introducing mean time between failures +.>And average repair time->t (r) represents the total running time of the node, F represents the number of faults of the node, and t (m) represents the total maintenance time of the node. Then->The total reputation calculation mode for the four factors is as follows: reproduction= (H) 1 ×T 1 )S+(H 0 ×T 0 )S。
3. The validated models are collected by client nodes selected by a reputation based node selection algorithm. These verified local model updates and generated reputation opinions are then uploaded by the notary nodes into an aggregated federation chain, where the nodes update the global model according to a global model aggregation algorithm and further feed back to the notary nodes according to the client node's reputation opinion.
4. Nodes in the aggregate alliance chain send information of malicious or dishonest client nodes to the power grid data processing center, and the power data center sends the information and data request information which is sent by a new round of client nodes together to a notary node.
5. The notary node receives the authenticated client node identity information and compares reputation ideas generated by a round of verification on the client to selectively agree to or reject the node's request.
Example two
The embodiment provides a power data-oriented decentralization sharing and cross-chain computing system.
An electric data-oriented decentralization sharing and cross-chain computing system comprises an electric data center, and an IPFS system, a first notary node, a data alliance chain, a training alliance chain and an aggregation alliance chain which are all in data interaction with the electric data center;
the power data center encrypts the collected power data and uploads the encrypted power data to the IPFS system;
the IPFS calculates a file fingerprint hash value of the encrypted power data and transmits the file fingerprint hash value back to the power data center;
the electric data center uploads the file fingerprint hash value to a data alliance chain;
each data demand in the training alliance chain sends a power data request and a public key PK of the power data center;
the electric power data center generates a proxy re-encryption key RK by utilizing a private key SK of the electric power data center and a public key PK of a data requiring party, and provides an electric power data request and the proxy re-encryption key RK for a first notary node;
the first notary node verifies the correctness of the power data requirement according to the file fingerprint hash value downloaded from the data alliance chain; and the encrypted power data downloaded from the IPFS system is secondarily encrypted using the proxy re-encryption key RK, and the secondarily encrypted power data is transmitted to the data demander in the training alliance chain,
the data demand party uses the private key of the data demand party to decrypt the secondary encrypted power data to obtain the encrypted power data;
training a local model by using the encrypted power data by a data demand party in the training alliance chain, generating reputation opinions for the data demand party after the local model is updated, and transmitting the local model update and the reputation opinions to the aggregation alliance chain;
the aggregation alliance chain sends the reputation comments to the power data center;
the electric power data center sends the reputation opinion and an electric power data request of a new round of data demander to a first notary node;
the first notary node selects to grant or deny the request of the data demander according to the identity information of the data demander and the reputation opinion of the previous round.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The power data-oriented decentralization sharing and cross-chain computing method is characterized by comprising the following steps of:
the power data center encrypts the collected power data, uploads the encrypted power data to the IPFS system, and uploads the file fingerprint hash value to the data alliance chain; the file fingerprint hash value is a file fingerprint hash value of the encrypted power data calculated by the IPFS system;
each data demand in the training alliance chain sends a power data request and a public key PK of the power data center;
the electric power data center generates a proxy re-encryption key RK by utilizing a private key SK of the electric power data center and a public key PK of a data requiring party, and provides an electric power data request and the proxy re-encryption key RK for a first notary node;
the first notary node verifies the correctness of the power data requirement according to the file fingerprint hash value downloaded from the data alliance chain; the agent re-encryption key RK is adopted to carry out secondary encryption on the encrypted power data downloaded from the IPFS system, and the secondary encrypted power data is sent to a data demand party in a training alliance chain, so that the data demand party uses a private key of the data demand party to decrypt the secondary encrypted power data, and the encrypted power data is obtained;
training a local model by using the encrypted power data by a data demand party in the training alliance chain, generating reputation opinions for the data demand party after the local model is updated, and transmitting the local model update and the reputation opinions to the aggregation alliance chain; so that the aggregate federation chain transmits the reputation opinion to the power data center;
the power data center sends the reputation opinion and the new round of power data request of the data demander to the first notary node so that the first notary node can choose to agree or reject the request of the data demander according to the identity information of the data demander and the reputation opinion of the previous round.
2. The power data oriented decentralization sharing and cross-chain computing method of claim 1, wherein the process of encrypting the collected power data by the power data center comprises: and the electric power data center encrypts the collected electric power data by adopting a homomorphic encryption algorithm.
3. The power data oriented decentralization sharing and cross-chain computing method of claim 1, wherein the election process of the first notary node comprises:
ranking the credit of each node in the data alliance chain, the training alliance chain and the aggregation alliance chain, and screening nodes with credit values higher than a set threshold value to form a notary node group to be selected;
according to the number of events served by nodes in the notary node group to be selected in the time interval T, the nodes in the notary node group to be selected are divided into a plurality of leader nodes and a plurality of common nodes, and the first notary node is selected from the plurality of leader nodes.
4. The power data oriented decentralization sharing and cross-chain computing method of claim 1, wherein the process of sending the power data request and the own public key PK to the power data center by each data demand in the training alliance chain comprises:
each data demand party generates public and private key pairs, namely KeyGen (P) → { PK i ,SK i -and using its own private key SK i Signing H on data request information R=hash(R);
CA is against its public key PK i After authentication, the request R and public key PK are authenticated i Transmitted to the power data center, which verifies the public key PK i If H' =h=hash (R) is true, the comparison confirmation is a power data request sent by a certain data consumer.
5. The power data oriented decentralised sharing and cross-chain computing method of claim 1, wherein several second notary nodes are selected prior to training the local model, and valid local models are selected for updating by smart contracts.
6. The power data oriented decentralised sharing and cross-chain computing method of claim 1, wherein the process of generating reputation opinions comprises: and the second notary node adopts a consensus algorithm to carry out broadcast verification on the updated effective local model, after verification, a new block storing the verified local model update is added into the distributed ledger, and after verification, the local model update is verified, reputation opinion is generated for the data demander.
7. The power data oriented decentralization sharing and cross-chain computing method of claim 6, wherein the second notary node sends local model updates and reputation opinions to an aggregate alliance chain, nodes in the aggregate alliance chain update global models according to a global model aggregation algorithm, the aggregate alliance chain feeds back to a third notary node according to the reputation opinions of the data demander, and the third notary node sends the reputation opinions of the data demander to the power data center; the third notary node is obtained by node election in the aggregation alliance chain.
8. The power data oriented decentralised sharing and cross-chain computing method of any of claims 1-7, wherein the reputation comprises aggressiveness, contribution, timeliness, and stability.
9. The power data oriented decentralization sharing and cross-chain computing method of claim 8, wherein the aggressiveness comprises a positive aggressiveness H 1 And negative aggressiveness H 0
Wherein P represents the total number of node participation, P 1 Representing the positive participation times, P 0 Indicating the number of negative active participation;
or, the contribution degree is:
wherein C is n Representing the contribution degree, L, of the node at the nth participation n-1 Representing losses at node n-1 participation, L n Representing a loss at the nth participation of the node;
or, the timeliness includes proving an aging T 1 And negative aging T 0
Wherein P is 1 Representing the positive participation times, P 0 Indicating the number of negative active participation times C n1 Represent positive contribution degree, C n0 Representing a negative contribution;
or, the stability is:
wherein S represents node network stability, MTBF represents average fault interval time, MTTR represents average repair time, t (r) represents node total operation time, F represents failure times of the node, and t (m) represents node total maintenance time.
10. The power data-oriented decentralization sharing and cross-chain computing system is characterized by comprising a power data center, and an IPFS system, a first notary node, a data alliance chain, a training alliance chain and an aggregation alliance chain which are all in data interaction with the power data center;
the power data center encrypts the collected power data and uploads the encrypted power data to the IPFS system;
the IPFS calculates a file fingerprint hash value of the encrypted power data and transmits the file fingerprint hash value back to the power data center;
the electric data center uploads the file fingerprint hash value to a data alliance chain;
each data demand in the training alliance chain sends a power data request and a public key PK of the power data center;
the electric power data center generates a proxy re-encryption key RK by utilizing a private key SK of the electric power data center and a public key PK of a data requiring party, and provides an electric power data request and the proxy re-encryption key RK for a first notary node;
the first notary node verifies the correctness of the power data requirement according to the file fingerprint hash value downloaded from the data alliance chain; and the encrypted power data downloaded from the IPFS system is secondarily encrypted using the proxy re-encryption key RK, and the secondarily encrypted power data is transmitted to the data demander in the training alliance chain,
the data demand party uses the private key of the data demand party to decrypt the secondary encrypted power data to obtain the encrypted power data;
training a local model by using the encrypted power data by a data demand party in the training alliance chain, generating reputation opinions for the data demand party after the local model is updated, and transmitting the local model update and the reputation opinions to the aggregation alliance chain;
the aggregation alliance chain sends the reputation comments to the power data center;
the electric power data center sends the reputation opinion and an electric power data request of a new round of data demander to a first notary node;
the first notary node selects to grant or deny the request of the data demander according to the identity information of the data demander and the reputation opinion of the previous round.
CN202311515093.7A 2023-11-14 2023-11-14 Power data-oriented decentralization sharing and cross-chain computing method and system Pending CN117527183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311515093.7A CN117527183A (en) 2023-11-14 2023-11-14 Power data-oriented decentralization sharing and cross-chain computing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311515093.7A CN117527183A (en) 2023-11-14 2023-11-14 Power data-oriented decentralization sharing and cross-chain computing method and system

Publications (1)

Publication Number Publication Date
CN117527183A true CN117527183A (en) 2024-02-06

Family

ID=89763868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311515093.7A Pending CN117527183A (en) 2023-11-14 2023-11-14 Power data-oriented decentralization sharing and cross-chain computing method and system

Country Status (1)

Country Link
CN (1) CN117527183A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117371025A (en) * 2023-09-18 2024-01-09 泉城省实验室 Method and system for training decentralised machine learning model

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105565A1 (en) * 2020-11-18 2022-05-27 深圳前海微众银行股份有限公司 Cross-chain blockchain communication method and apparatus
CN114697073A (en) * 2022-02-22 2022-07-01 昆明理工大学 Block chain-based telecom operator data secure sharing method
CN116450572A (en) * 2022-12-13 2023-07-18 国网辽宁省电力有限公司信息通信分公司 Power supply chain data storage optimization method and system based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105565A1 (en) * 2020-11-18 2022-05-27 深圳前海微众银行股份有限公司 Cross-chain blockchain communication method and apparatus
CN114697073A (en) * 2022-02-22 2022-07-01 昆明理工大学 Block chain-based telecom operator data secure sharing method
CN116450572A (en) * 2022-12-13 2023-07-18 国网辽宁省电力有限公司信息通信分公司 Power supply chain data storage optimization method and system based on block chain

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴振铨;梁宇辉;康嘉文;余荣;何昭水;: "基于联盟区块链的智能电网数据安全存储与共享系统", 计算机应用, no. 10, 10 October 2017 (2017-10-10) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117371025A (en) * 2023-09-18 2024-01-09 泉城省实验室 Method and system for training decentralised machine learning model
CN117371025B (en) * 2023-09-18 2024-04-16 泉城省实验室 Method and system for training decentralised machine learning model

Similar Documents

Publication Publication Date Title
Liang et al. PDPChain: A consortium blockchain-based privacy protection scheme for personal data
Luo et al. Blockchain based secure data aggregation and distributed power dispatching for microgrids
Guan et al. A blockchain-based dual-side privacy-preserving multiparty computation scheme for edge-enabled smart grid
Cao et al. Blockchain-empowered security and privacy protection technologies for smart grid
Wang et al. Blockchain-based dynamic energy management mode for distributed energy system with high penetration of renewable energy
CN117527183A (en) Power data-oriented decentralization sharing and cross-chain computing method and system
CN115883102B (en) Cross-domain identity authentication method and system based on identity credibility and electronic equipment
Guo et al. Accountable attribute-based data-sharing scheme based on blockchain for vehicular ad hoc network
CN115270145A (en) User electricity stealing behavior detection method and system based on alliance chain and federal learning
Zhang et al. Model of decentralized cross-chain energy trading for power systems
Javed et al. Secure message handling in vehicular energy networks using blockchain and artificially intelligent IPFS
Dolev et al. SodsBC: a post-quantum by design asynchronous blockchain framework
Zhang et al. A verifiable and privacy-preserving cloud mining pool selection scheme in blockchain of things
Zhang et al. A lightweight privacy preserving scheme of charging and discharging for electric vehicles based on consortium blockchain in charging service company
Chen et al. IOV Privacy Protection System Based on Double‐Layered Chains
Wen et al. BUA: a blockchain-based unlinkable authentication scheme for mobile IoT
Xiong et al. A blockchain-based and privacy-preserved authentication scheme for inter-constellation collaboration in Space-Ground Integrated Networks
CN117034287A (en) Multiparty joint modeling safety enhancement method based on privacy computing interconnection and interworking technology
Noh et al. A Novel User Collusion‐Resistant Decentralized Multi‐Authority Attribute‐Based Encryption Scheme Using the Deposit on a Blockchain
Gong et al. A threshold group signature scheme suitable for the Internet of Things
Huang et al. A dynamic anonymous authentication scheme with trusted fog computing in V2G networks
Yang et al. Scalable and auditable self-agent pseudonym management scheme for intelligent transportation systems
He et al. A Blockchain-based carbon emission security accounting scheme
Yang et al. Blockchain-based multi-authority revocable data sharing scheme in smart grid
CN102624748A (en) Peer-to-peer (P2P) network access control 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