A decentralized sharing and cross-chain computing method and system for power data

Through decentralized sharing and cross-chain computing methods, blockchain and federated learning technology are used to solve the security and scalability problems in power data sharing and privacy computing, and the secure storage and efficient sharing of power data are achieved.

CN117527183BActive Publication Date: 2025-02-11UNIV OF JINAN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311515093.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-02-11
Estimated Expiration
2043-11-14

AI Technical Summary

Technical Problem

The lack of effective power data sharing and privacy computing systems in the prior art has led to security and scalability problems in the circulation and application of power data.

Method used

Decentralized sharing and cross-chain computing methods are adopted to record the power data sharing circulation and calculation process through blockchain, and the rights and responsibilities are achieved, and the federated learning method is used to maximize the application value of power data. Specific implementations include power data encryption, proxy re-encryption, notary node verification and reputation feedback, etc.

Benefits of technology

It realizes the secure storage and transmission of power data, combines cross-chain technology and federated learning technology for on-chain information sharing and computing, improves data flow and security, and solves the problem of insufficient performance of a single blockchain network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117527183B_ABST
    Figure CN117527183B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of blockchain and machine learning, and provides a decentralized sharing and cross-chain computing method and system for power data. In the first part, the method uses intelligent Internet of Things devices to collect power data and uses the IPFS system in combination with the alliance blockchain to store the power data, and combines homomorphic encryption technology to ensure the privacy of the data. The above method is used to complete the collection and storage of power data. The proxy re-encryption technology is used to complete the conversion of the right to obtain ciphertext data, and the cross-chain technology based on notary nodes and the data alliance chain are used to complete the sharing of power data to local client nodes in the training alliance chain. In the second part, effective local model updates are selected and local model updates are uploaded to the chain. Global model aggregation is completed by aggregating the alliance chain, and the node reputation information is uploaded to the chain and the node reputation information is fed back to the power data center at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain and machine learning technology, and in particular to a decentralized sharing and cross-chain computing method and system for power data. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the progress of social science and technology and the development of smart grid information construction, the demand for electricity consumption has increased dramatically, resulting in a massive amount of electricity data. The acquired electricity data is of great value, which can not only promote power agencies to formulate better power transmission plans for the region and optimize the management and operation strategies of the power grid. In addition, it can be shared with other institutions in the application process, combined with data from other institutions in the field for multi-directional data calculation and analysis, so that the power data can play a greater value.

[0004] At present, there is little experience in how to share and calculate privacy for power data, and no complete system framework has been formed, which restricts the feasibility of the circulation and application of the entire power data.

[0005] The main problems are: lack of property rights confirmation mechanism for power data sharing, lack of applicability of power data in the circulation process, inconvenient data sharing and poor circulation generated during the secure storage and sharing of power data and calculation, privacy leakage, and limited scalability caused by the use of a single blockchain network in the training, analysis and calculation of large-scale models of power data, as well as dishonesty in the local model training of federal client nodes and the global model aggregation of nodes and single point failure of traditional central servers. Summary of the invention

[0006] In order to solve the technical problems existing in the above background technology, the present invention provides a decentralized sharing and cross-chain computing method and system for power data. The present invention records the entire process of power data sharing, circulation and computing through blockchain, and realizes clear division of rights and responsibilities in the sharing and computing process. The federated learning method is used to ensure that the value of power data in terms of applicability is maximized.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] The first aspect of the present invention provides a decentralized sharing and cross-chain computing method for power data.

[0009] A decentralized sharing and cross-chain computing method for power data, comprising:

[0010] 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 the file fingerprint hash value of the encrypted power data calculated by the IPFS system;

[0011] Each data demand direction in the training alliance chain sends power data requests and its own public key PK to the power data center;

[0012] The power data center generates a proxy re-encryption key RK using its own private key SK and the public key PK of the data demander, and provides the power data request and the proxy re-encryption key RK to the first notary node;

[0013] The first notary node verifies the correctness of the power data demand based on the file fingerprint hash value downloaded from the data alliance chain; and uses the proxy re-encryption key RK to re-encrypt the encrypted power data downloaded from the IPFS system, and sends the re-encrypted power data to the data demander in the training alliance chain, so that the data demander can use its own private key to decrypt the re-encrypted power data and obtain the encrypted power data;

[0014] The data demanders in the training alliance chain use encrypted power data to train local models, generate reputation opinions for the data demanders after the local model is updated, and send the local model updates and reputation opinions to the aggregate alliance chain; so that the aggregate alliance chain sends the reputation opinions to the power data center;

[0015] The power data center sends the reputation opinion and the power data request of the new round of data demanders to the first notary node, so that the first notary node can choose to approve or reject the request of the data demander based on the identity information of the data demander and the reputation opinion of the previous round.

[0016] Furthermore, the process of encrypting the collected power data by the power data center includes: the power data center encrypts the collected power data using a homomorphic encryption algorithm.

[0017] Furthermore, the election process of the first notary node includes:

[0018] Rank the reputation of each node in the data alliance chain, training alliance chain, and aggregation alliance chain, select nodes with reputation values ​​higher than the set threshold, and form a group of notary nodes to be selected;

[0019] According to the number of events served by the nodes in the candidate notary node group within the time interval T, the nodes in the candidate notary node group are divided into a number of leading nodes and a number of ordinary nodes, and the first notary node is elected from the number of leading nodes.

[0020] Furthermore, the process in which each data demand direction in the training alliance chain sends a power data request and its own public key PK to the power data center includes:

[0021] Each data demander generates a public-private key pair, namely KeyGen(P)→{PK i , S.K. i}, and use your own private key SK i Sign the data request information R as H = hash(R);

[0022] CA's public key PK i After authentication, the request R and public key PK i Sent to the power data center, which verifies the public key PK i The authenticity of the data is checked by calculating whether H′=H=hash(R) is established, and then comparing and confirming that it is a power data request sent by a data demander.

[0023] Furthermore, before training the local model, several second notary nodes are selected to select valid local models for updating through smart contracts.

[0024] Furthermore, the process of generating reputation opinions includes: the second notary node uses a consensus algorithm to broadcast and verify the updated valid local model. After verification, a new block storing the verified local model update is added to the distributed ledger, and a reputation opinion is generated for the data demander after verifying the local model update.

[0025] Furthermore, the second notary node sends the local model update and reputation opinion to the aggregated alliance chain, the nodes in the aggregated alliance chain update the global model according to the global model aggregation algorithm, the aggregated alliance chain feeds back to the third notary node according to the reputation opinion of the data demander, and the third notary node sends the reputation opinion of the data demander to the power data center; wherein, the third notary node is elected by the nodes in the aggregated alliance chain.

[0026] Furthermore, the reputation opinion includes enthusiasm, contribution, timeliness and stability.

[0027] Furthermore, the positivity includes positive positivity H 1 and negative positivity H 0 :

[0028]

[0029] Among them, P represents the total number of participating nodes, P 1 P indicates the number of positive and active participation. 0 Indicates the number of negative active participations;

[0030] Furthermore, the contribution is:

[0031]

[0032] Among them, C n Indicates the contribution of the node when it participates for the nth time, L n-1 represents the loss when the node participates for the n-1th time, L n represents the loss when the node participates for the nth time;

[0033] Furthermore, the timeliness includes proving the timeliness T 1 and negative time T 0 :

[0034]

[0035] Among them, P 1 P indicates the number of positive and active participation. 0 represents the number of negative active participations, C n1 Indicates positive contribution, C n0 Indicates negative contribution;

[0036] Furthermore, the stability is:

[0037]

[0038] Among them, S represents the node network stability, MTBF represents the mean time between failures, MTTR represents the mean repair time, t(r) represents the total running time of the node, F represents the number of failures that occur in the node, and t(m) represents the total maintenance time of the node.

[0039] The second aspect of the present invention provides a decentralized sharing and cross-chain computing system for power data.

[0040] A decentralized sharing and cross-chain computing system for power data, including 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 that interact with the power data center;

[0041] The power data center encrypts the collected power data and uploads the encrypted power data to the IPFS system;

[0042] The IPFS system calculates the file fingerprint hash value of the encrypted power data and transmits the file fingerprint hash value back to the power data center;

[0043] The power data center uploads the file fingerprint hash value to the data alliance chain;

[0044] Each data demand direction in the training alliance chain sends a power data request and its own public key PK to the power data center;

[0045] The power data center generates a proxy re-encryption key RK using its own private key SK and the public key PK of the data demander, and provides the power data request and the proxy re-encryption key RK to the first notary node;

[0046] The first notary node verifies the correctness of the power data demand based on the file fingerprint hash value downloaded from the data alliance chain; and uses the proxy re-encryption key RK to re-encrypt the encrypted power data downloaded from the IPFS system, and sends the re-encrypted power data to the data demander in the training alliance chain.

[0047] The data demander uses his own private key to decrypt the secondary encrypted power data and obtain the encrypted power data;

[0048] The data demanders in the training alliance chain use encrypted power data to train local models, generate reputation opinions for the data demanders after the local model is updated, and send the local model updates and reputation opinions to the aggregation alliance chain;

[0049] The aggregated consortium chain sends reputation opinions to the power data center;

[0050] The power data center sends the reputation opinion and the power data request of the new round of data demanders to the first notary node;

[0051] The first notary node chooses to approve or reject the request of the data demander based on the identity information of the data demander and the reputation opinion in the previous round.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] The present invention combines cross-chain technology based on external verification of a notary mechanism, cryptography technology and federated learning technology to realize a solution for secure storage, sharing and calculation of power data. This solution can securely store and transmit massive power data collected by IoT devices such as smart meters, and combine cross-chain technology with federated learning technology for on-chain information sharing and calculation.

[0054] The present invention introduces a reputation feedback mechanism, and introduces node reputation as an important criterion into the election, training and aggregation process to measure the reliability and credibility of notary nodes and client training nodes. The reputation management mechanism can better elect notary nodes and manage participants, ensure the quality of data submitted during model training, improve the accuracy of the model, and prevent malicious participants from attacking the system.

[0055] The present invention can achieve decentralization by deploying and applying power data calculation tasks in the blockchain network during the process of power data sharing and calculation, avoiding the unreliability of the entire federal system caused by the failure of the central server. It adopts the form of three alliance chains and uses cross-chain technology to meet the large amount of computing resources required for training and aggregating large-scale models, thereby solving the problems of performance degradation, increased latency, insufficient processing power and limited scalability of a single blockchain network.

[0056] In the present invention, by electing multiple notary nodes to collaboratively circulate and calculate power data between alliance chains, it helps to avoid risks and build a more powerful, flexible and interconnected power data sharing and calculation system to meet the needs of different enterprises and institutions. This solution uses cross-chain technology to solve the interoperability problem between different alliance chains, improve the flow of power data, increase data sharing and reduce risks. Provide an effective solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0058] Figure 1 It is a flow chart of the decentralized sharing and cross-chain computing method for power data shown in the present invention. DETAILED DESCRIPTION

[0059] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0060] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0061] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0062] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0063] Terminology explanation:

[0064] 1. Blockchain is an emerging decentralized storage technology and an important research direction of distributed storage. Without introducing a third party, it uses a distributed network architecture to achieve decentralization, data tamper-proofing, and traceability while storing and sharing data. The above characteristics are suitable for application scenarios of power data sharing and computing. However, in order to avoid the storage burden of blockchain, the Interstellar File System (IPFS) is introduced to achieve hybrid storage on and off the chain. IPFS is a global peer-to-peer distributed file system that provides a platform for the management and distribution of large data.

[0065] 2. Privacy computing is a technical method in the field of computer science and information security, which aims to protect the privacy of users to the greatest extent when processing and analyzing personal or sensitive data, so as to maximize the value of data while ensuring data security. Traditional data computing and analysis methods mostly use machine learning to train models in a centralized manner, which requires that the training data needs to be concentrated on the same server. Federated learning is one of the commonly used technologies in privacy computing. It is an emerging machine learning paradigm and a special form of machine learning federation. It jointly models data distributed on multiple devices while ensuring privacy. It is a method for data computing and analysis across multiple devices. However, the traditional federated learning framework still faces some problems that affect the reliability of federated learning. Single point failure is a threat that may occur in the process of federated learning. In the usual federated learning paradigm, a central server, usually called an aggregator, is used to perform the integration of local training results to facilitate global model updates. However, the aggregator is not always reliable. Once the centralized aggregator is destroyed, the entire federated learning system will fail. The cross-chain technology based on the notary mechanism is a method and technology used for interoperability between different blockchains to solve problems such as data transmission and asset transfer between different blockchains. It elects public nodes to transmit information between different blockchains and verify the validity and correctness of cross-chain transactions to ensure the security and integrity of the transmitted data.

[0066] 3. FISCO BCOS domestic alliance blockchain underlying platform: FISCO BCOS is an open source enterprise-level blockchain platform designed to provide highly customizable, secure and controllable blockchain solutions for enterprises and organizations. It has a wide range of customizability and flexibility, which can meet the needs of multiple fields such as finance, supply chain, Internet of Things, government, etc. The platform allows users to customize permissions and privacy settings as needed, ensuring that only authorized participants can access and operate the blockchain network. The platform supports smart contract development. Users can use Solidity or other supported programming languages ​​to create smart contracts, which can be used to automate the execution of various business logics. The platform also has high performance, supports high throughput and low latency, and can handle large amounts of transactions and data. The platform supports horizontal expansion, and can dynamically expand network capacity according to demand to adapt to the growing volume of transactions and data, and provides multi-level privacy protection mechanisms, including zero-knowledge proof, federated learning and other technologies to ensure that participants' sensitive data is protected. The platform is widely used in the financial industry, government projects and other fields that require secure and reliable blockchain solutions.

[0067] 4. FedAVG Federated Learning Framework: FedAVG is a federated learning framework designed to solve the problems of decentralized data and privacy protection. FedAVG only performs local training on the local device, and then aggregates the updated parameters of the local model into a global model, which means that the original data always stays local and is not concentrated on the central server, thus protecting the privacy of users. Unlike traditional centralized training methods, FedAVG only needs to transmit parameter updates of the local model without transmitting the original data, which greatly reduces the amount of data transmission and reduces communication costs and delays. Federated learning allows training on decentralized data sources without the need to concentrate data in one place, which allows institutions, devices or individuals to collaborate to train global models without sharing data. FedAVG is adaptable to various types of devices, including mobile devices, embedded devices, and cloud servers, because model updates are performed locally and do not require powerful computing resources. Since the federated learning framework enables the model to be trained on multiple devices, it can better adapt to various devices and data distributions, improving the versatility and robustness of the model. The federated learning framework can be easily extended to a large number of participants and is suitable for various application scenarios, including medical, financial, and Internet of Things.

[0068] Embodiment 1

[0069] This embodiment provides a decentralized sharing and cross-chain computing method for power data.

[0070] This embodiment is designed in two parts, the first part is the power data collection and sharing stage, and the second part is the power data application and calculation stage. In the first part, smart IoT devices are used to collect power data and the Interstellar File System (IPFS) is used in combination with the alliance blockchain to store power data, and the homomorphic encryption technology is combined to ensure the privacy of the data. The above method is used to complete the collection and storage of power data. The proxy re-encryption technology is used to complete the conversion of the ciphertext data acquisition rights, and the cross-chain technology based on the notary node and the data alliance chain are used to complete the sharing of power data to the local client nodes in the training alliance chain. In the second part, the reputation-based node selection algorithm and the Byzantine fault-tolerant algorithm are used to select effective local model updates and local model updates on the chain. Global model aggregation is completed by aggregating the alliance chain, and the node reputation information is chained and the node reputation information is fed back to the power data center at the same time. Power data calculation is performed in this way.

[0071] like Figure 1 As shown, the specific steps are as follows:

[0072] Part 1: Power data collection and sharing stage:

[0073] 1. Users in a region use IoT devices such as smart meters to collect electricity data, and then transmit the electricity data to the power data center.

[0074] 2. The power data center will encrypt the collected power data using an improved homomorphic encryption algorithm and upload it to the distributed cluster storage system IPFS, where it will calculate and generate the file fingerprint hash value corresponding to the encrypted data. The power data center will upload the returned file fingerprint hash value to the data alliance chain, thereby achieving reliable storage and traceable access to ensure data integrity.

[0075] 3. Each data demander (federal client) in the training alliance chain sends a power data request through CA authorization and provides their own node public key PK, and the power data center verifies the identity information of the data demander.

[0076] 4. The power data center uses its own private key SK and the public key PK provided by the data demander node to generate the proxy re-encryption key RK, and provides the demand node request information and the proxy re-encryption key RK to the notary node 1.

[0077] 5. Notary node 1 requests the file fingerprint hash value from the data alliance chain through the data request smart contract, and downloads the file fingerprint hash value.

[0078] 6. Notary node 1 downloads the corresponding encrypted power data through the file fingerprint, calculates the hash value of the encrypted power data and compares it with the file fingerprint hash value obtained from the data alliance chain to confirm that the required data is correct.

[0079] 7. Notary node 1 uses the proxy re-encryption key RK to re-encrypt the power data and sends the re-encrypted power data to the data demander node in the training alliance chain.

[0080] 8. The data demander node (i.e., the federal client) uses its own private key SK to decrypt and obtain the encrypted power data.

[0081] The detailed steps for implementing this part are as follows:

[0082] 1. PC (power data center) executes the power data encryption algorithm, PKeyGen: randomly selects two large prime numbers p and q, calculates the public key n = pq, calculates the least common multiple of p-1 and q-1, that is, λ = lcm(p-1,q-1), and the private key b = λ -1 mod(n). PEncrypt: Select multiple random numbers r before encryption, and then perform pre-operation r n mod(n 2 ), during the encryption process, only some r n mod(n2 ) Encrypt the plaintext power data M, that is, CT = (1 + Mn)r n mod(n 2 ), the encryption process is as follows:

[0083]

[0084] 2. Upload the encrypted ciphertext power data to the Interplanetary File System (IPFS), calculate and generate the hash value corresponding to the ciphertext power data, return the file fingerprint hash value, and upload it to the data alliance chain.

[0085]

[0086] 3. The data upload record of power data, the request record of the client request node, and the ciphertext hash value returned by IPFS are all recorded as transaction data on the blockchain. Based on the traceability of the blockchain, data auditing and user non-repudiation can be achieved, and in order to ensure the consistency of block data, it is necessary to select a suitable consensus mechanism to ensure the smooth generation of blocks and reduce the communication delay of the blockchain platform. The PBFT consensus algorithm is often used in alliance chains due to its high throughput, low transaction latency, and tolerance to Byzantine errors. Therefore, this solution selects the PBFT algorithm as the consensus mechanism of the blockchain platform. The consensus process is divided into three stages. The first is the Pre-prepare stage: the master node sends a proposal to the backup node, packages the block, encapsulates the new block in the prepare package, and broadcasts the prepare package to other nodes. After receiving the package, other nodes execute the block and broadcast the signature package. Then comes the prepare stage: after other nodes collect 2f+1 signature packages, they broadcast Commit requests to other nodes. The last phase is the Commit phase: after other nodes collect 2f+1 Commit requests, they write the block into the data. At this point, the client node knows that consensus has been reached and can safely execute the corresponding request.

[0087] 4. Notary node election: Notary nodes are elected by the nodes in the alliance chain. According to the node reputation ranking, some high-reputation nodes are selected from each alliance chain participating in the cross-chain to form a notary node group to be elected {N 1 , N 2 , ... N S}, and then divide the nodes in the candidate notary node group into several leader nodes and several ordinary nodes according to the number of events served by the nodes in the candidate notary node group within the time interval T. Ordinary nodes can become leader nodes by increasing the number of events they serve. Only leader nodes can be elected as notary nodes.

[0088] 5. The client node sends a data request message: The client node generates a public-private key pair, namely KeyGen(P)→{PK i , S.K. i}, and use your own private key SK i Sign the data request information R with H = hash(R), and then the CA (certificate authority) signs its public key PK i After authentication, the request R and public key PK i The data is sent to the power data center, which verifies the authenticity of the public key and calculates whether H′=H=hash(R) to confirm that it is a data request information sent by a client node.

[0089] 6. The power data center uses its own private key SK p And the public key PK of the client node i Perform calculations to generate the re-encryption key RK, and send the re-encryption key and data request information to the notary node. Key generation: Input global parameter P, client node public key PK i , Power Data Center Private Key SK p , output proxy re-encryption key RK, RKeyGen(P, PK i , S.K. p ) → {RK}

[0090] 7. The notary node requests the power data fingerprint hash value and downloads the ciphertext power data:

[0091]

[0092]

[0093] 8. The notary node encrypts the ciphertext power data using the re-encryption key and then transmits it to the client node: REcryption(P,RK.FileCT)→{C(FileCT)}

[0094] 9. The client node uses its own private key SK i Decrypt ciphertext C i Get the encrypted power data Dec(PSK i , C i )→{FileCT}.

[0095] Part II: Power data application and calculation stage:

[0096] When the client of federated learning is a node of the blockchain, we define the federated learning framework as a fully embedded federated learning framework, that is, the blockchain node (client) not only trains the local model, but also verifies the update and generates new blocks. The federated training method is decentralized, and local training and global model aggregation use dual alliance chains. Each node in the alliance chain has the opportunity to participate in local model training and global model training, so the aggregated alliance chain can play the role of a central aggregation server. The training data generated during the training process, including verified local model updates and global model updates, are stored in the corresponding blockchain network distributed ledger.

[0097] 1. The nodes (client nodes) in the training alliance chain have obtained the encrypted power data, so local training is performed on the nodes, and local training obtains local model updates.

[0098] 2. Before uploading the local model update, select several honest client nodes (notary node 2) to select valid local model updates through smart contracts, thereby discarding low-precision models, thus laying the foundation for the subsequent high-quality aggregation of the global model.

[0099] 3. The approved local model update is broadcast and verified by the selected client node through the consensus algorithm, and a new block storing the verified model update is added to the distributed ledger. After the node verifies the local model update, a reputation opinion is generated for the node.

[0100] The definition of a new block is as follows: 1. Include the hash value of the previous block in the new block to ensure the link between blocks. 2. Generate a new timestamp to mark the time when the new block was generated. Once a node successfully generates a new block, it will be broadcast to the entire network. The network here is the training alliance chain network. Each node will receive and verify the block. After successful verification, the new block will be added to the blockchain.

[0101] A distributed ledger is a decentralized database technology used to share, store, and synchronize data between multiple nodes. Usually, the distributed ledger exists in the form of a blockchain.

[0102] 4. The verified local updates are collected by the client nodes selected by the reputation-based node selection algorithm. These verified local model updates and the generated reputation opinions are then uploaded to the aggregation alliance chain through the notary node 2. The nodes in the aggregation alliance chain update the global model according to the global model aggregation algorithm and provide feedback to the notary node 3 based on the reputation opinions of the client nodes. The updated global model can be used for power data analysis.

[0103] 5. The notary node 3 in the aggregated alliance chain sends information about malicious or dishonest client nodes to the power grid data processing center. The power data center sends this information to the notary node 1 together with the data request information sent by the client nodes in the new round of training alliance chain.

[0104] 6. Notary node 1 receives the verified client node identity information and compares and verifies the reputation opinion generated by the client in the previous round, and selectively agrees or rejects the node's request.

[0105] 7. The power data sharing and calculation process under this mode is repeated over and over again.

[0106] The detailed steps for implementing this part are as follows:

[0107] 1. The client node uses the encrypted power data Dec(PSK i , C i )→{FileCT}Joint modeling training data:

[0108]

[0109] 2. It is necessary to select a suitable honest working node training and aggregation model through reputation calculation. The node reputation score of this scheme is mainly affected by four factors: enthusiasm, contribution, timeliness, and stability. The node enthusiasm is represented by H. The higher the enthusiasm, the more participation in interaction. The enthusiasm is divided into positive enthusiasm H 1 and negative positivity H 0 , the formula is as follows: P represents the total number of participating nodes, P 1 P indicates the number of positive and active participation. 0 Represents the number of negative active participations. The contribution is represented by C. Assuming that the node participates in the training for the nth time, the loss of the model can be expressed as L n-1 and L n , when a node participates for the nth time, its contribution is expressed as follows: If the numerator is greater than 0, that is, C n >0, indicating that the model loss is reduced and the node makes a positive contribution. n <0, that is, the node makes a negative contribution. Timeliness is represented by T. As time goes on, training continues to change, the model is constantly updated, and the contribution of model accuracy to reputation

[0110] It is changing all the time, and it is believed that the contribution closer to the current time should have a higher weight, which is expressed as follows:

[0111] Where T c is the current time, T nis the time when the local model is shared for the nth time. Timeliness is also divided into positive timeliness and negative timeliness, which are expressed as follows: and Among them C n1 and C n0 Indicates positive contribution and negative contribution. S represents the node network stability, and introduces the mean time between failures and mean time to repair t(r) represents the total running time of the node, F represents the number of failures that occur in the node, and t(m) represents the total maintenance time of the node. The total reputation calculation method based on the above four factors is as follows: Reputation = (H 1 ×T 1 )S+(H 0 ×T 0 )S.

[0112] 3. The verified models are collected by the client nodes selected by the reputation-based node selection algorithm. These verified local model updates and the generated reputation opinions are then uploaded to the aggregation alliance chain through the notary node. The nodes in the aggregation alliance chain update the global model according to the global model aggregation algorithm, and further feedback to the notary node based on the reputation opinions of the client nodes.

[0113] 4. The nodes in the aggregated alliance chain send information about malicious or dishonest client nodes to the power grid data processing center. The power data center sends this information to the notary node together with the data request information sent by the new round of client nodes.

[0114] 5. The notary node receives the verified identity information of the client node and compares and verifies the reputation opinion generated by the client in the previous round, and then selectively agrees or rejects the node's request.

[0115] Embodiment 2

[0116] This embodiment provides a decentralized sharing and cross-chain computing system for power data.

[0117] A decentralized sharing and cross-chain computing system for power data, including 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 that interact with the power data center;

[0118] The power data center encrypts the collected power data and uploads the encrypted power data to the IPFS system;

[0119] The IPFS system calculates the file fingerprint hash value of the encrypted power data and transmits the file fingerprint hash value back to the power data center;

[0120] The power data center uploads the file fingerprint hash value to the data alliance chain;

[0121] Each data demand direction in the training alliance chain sends a power data request and its own public key PK to the power data center;

[0122] The power data center generates a proxy re-encryption key RK using its own private key SK and the public key PK of the data demander, and provides the power data request and the proxy re-encryption key RK to the first notary node;

[0123] The first notary node verifies the correctness of the power data demand based on the file fingerprint hash value downloaded from the data alliance chain; and uses the proxy re-encryption key RK to re-encrypt the encrypted power data downloaded from the IPFS system, and sends the re-encrypted power data to the data demander in the training alliance chain.

[0124] The data demander uses his own private key to decrypt the secondary encrypted power data and obtain the encrypted power data;

[0125] The data demanders in the training alliance chain use encrypted power data to train local models, generate reputation opinions for the data demanders after the local model is updated, and send the local model updates and reputation opinions to the aggregation alliance chain;

[0126] The aggregated consortium chain sends reputation opinions to the power data center;

[0127] The power data center sends the reputation opinion and the power data request of the new round of data demanders to the first notary node;

[0128] The first notary node chooses to approve or reject the request of the data demander based on the identity information of the data demander and the reputation opinion in the previous round.

[0129] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A decentralized sharing and cross-chain computing method for power data, characterized in that: include: 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 the file fingerprint hash value of the encrypted power data calculated by the IPFS system; Each data demand direction in the training alliance chain sends power data requests and its own public key PK to the power data center; The power data center generates a proxy re-encryption key RK using its own private key SK and the public key PK of the data demander, and provides the power data request and the proxy re-encryption key RK to the first notary node; The first notary node verifies the correctness of the power data demand based on the file fingerprint hash value downloaded from the data alliance chain; and uses the proxy re-encryption key RK to re-encrypt the encrypted power data downloaded from the IPFS system, and sends the re-encrypted power data to the data demander in the training alliance chain, so that the data demander can use its own private key to decrypt the re-encrypted power data and obtain the encrypted power data; The data demanders in the training alliance chain use encrypted power data to train local models, generate reputation opinions for the data demanders after the local model is updated, and send the local model updates and reputation opinions to the aggregate alliance chain; so that the aggregate alliance chain sends the reputation opinions to the power data center; The power data center sends the reputation opinion and the power data request of the new round of data demanders to the first notary node, so that the first notary node can choose to approve or reject the request of the data demander based on the identity information of the data demander and the reputation opinion of the previous round; The process of generating reputation opinions includes: the second notary node uses a consensus algorithm to broadcast and verify the updated valid local model. After verification, a new block storing the verified local model update is added to the distributed ledger, and a reputation opinion is generated for the data demander after verifying the local model update.

2. The decentralized sharing and cross-chain computing method for power data according to claim 1 is characterized in that: The process of encrypting the collected power data by the power data center includes: the power data center encrypts the collected power data using a homomorphic encryption algorithm.

3. The decentralized sharing and cross-chain computing method for power data according to claim 1 is characterized in that: The election process of the first notary node includes: Rank the reputation of each node in the data alliance chain, training alliance chain, and aggregation alliance chain, select nodes with reputation values ​​higher than the set threshold, and form a group of notary nodes to be selected; According to the time interval The number of events served by the nodes in the candidate notary node group is calculated, and the nodes in the candidate notary node group are divided into several leading nodes and several ordinary nodes, and the first notary node is elected from the several leading nodes.

4. The decentralized sharing and cross-chain computing method for power data according to claim 1 is characterized in that: The process of each data demand direction in the training alliance chain sending a power data request and its own public key PK to the power data center includes: Each data demander generates a public-private key pair. → PK i , SK i }, and use your own private key SK i Request information about data Sign ; Its public key PK i After authentication, the request and the public key PK i Sent to the power data center, which verifies the public key PK i Authenticity, calculation Whether it is true, compare and confirm that it is a power data request sent by a data demander.

5. The decentralized sharing and cross-chain computing method for power data according to claim 1 is characterized in that: Before training the local model, several second notary nodes are selected to select valid local models for update through smart contracts.

6. The decentralized sharing and cross-chain computing method for power data according to claim 1 is characterized in that: The second notary node sends the local model update and reputation opinion to the aggregated alliance chain. The nodes in the aggregated alliance chain update the global model according to the global model aggregation algorithm. The aggregated alliance chain feeds back to the third notary node based on the reputation opinion of the data demander. The third notary node sends the reputation opinion of the data demander to the power data center; wherein the third notary node is elected by the nodes in the aggregated alliance chain.

7. The decentralized sharing and cross-chain computing method for power data according to any one of claims 1 to 6, characterized in that: The reputation opinions include enthusiasm, contribution, timeliness and stability.

8. The decentralized sharing and cross-chain computing method for power data according to claim 7 is characterized in that: The positivity includes positive positivity H 1 and negative positivity H 0: H 1 H 0 Among them, P represents the total number of participating nodes, Indicates the number of positive and active participations, Indicates the number of negative active participations; Or, the contribution is: C n = in, C n Indicates the contribution of the node when it participates for the nth time, L n-1 represents the loss when the node participates for the n-1th time, L n represents the loss when the node participates for the nth time; or, the timeliness includes the timeliness of proof T 1 and negative statute of limitations T 0: T 1 T 0 in, Indicates the number of positive and active participations, Indicates the number of negative active participations, C n1 Indicates positive contribution, C n0 Indicates negative contribution; Or, the stability is: S = MTBF = MTTR = in, S Indicates the node network stability, MTBF Mean time between failures, MTTR represents the mean time to repair, t (r) Indicates the total running time of the node, F Indicates the number of failures that occurred on the node. t(m) Indicates the total maintenance time of the node.

Citation Information

Patent Citations

  • Telecommunication operator data security sharing method based on block chain

    CN114697073A

  • Block chain-based power supply chain data storage optimization method and system

    CN116450572A