Sharing mechanism based on blockchain distributed database
By adopting multi-level verification and encryption processing in the blockchain distributed database, combined with Ethereum client and consensus algorithm, the credit endorsement and smart contract security problems of blockchain technology are solved, and efficient registration of power trading services is achieved. Verification and data verification reduce the risk of attack.
Patent Information
- Application Number
- CN202110918716.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-11
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2041-08-11
AI Technical Summary
The decentralized nature of blockchain technology makes it difficult to form credit endorsements, poses huge risks of business transformation, and the security issues of smart contracts are easily maliciously attacked and difficult to quickly repair, causing losses.
Using a sharing mechanism based on blockchain distributed database, through multi-level verification of the data layer, network layer and consensus layer, combining Ethereum client, POW consensus and POS consensus, and Byzantine fault-tolerant BFT algorithm to form data consensus, and use Ha The SAR algorithm and the encryption transmission module perform data processing and proof storage.
It realizes the control of market member registration and electronic contracts of power trading business, fast authentication and verification, real-time monitoring, data traceability and query, reduces the risk of security vulnerability attacks, and improves the generation time of blockchain and the immutability of data.
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of blockchain systems, and specifically relates to a sharing mechanism based on a blockchain distributed database. Background Art
[0002] Blockchain is a new application model of decentralized distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. The so-called consensus mechanism is a mathematical algorithm that enables different nodes in the blockchain system to establish trust and obtain rights and interests.
[0003] Decentralization means: peer-to-peer communication technology is a peer-to-peer Internet technology that relies on the common computing power and bandwidth of participants in the network to achieve communication between equal peer nodes. Asymmetric encryption algorithm: Use asymmetric encryption algorithm to encrypt data and verify signatures. Use public key to encrypt data, use private key to decrypt, use private key to sign, and use public key to verify signatures. Chain data structure: What we often call block generation refers to the storage of data on each block. Each block is combined together in a chain to form a data structure. The header of each block contains the compressed value of the transaction information of the previous block, so that the genesis block can be linked to the current block, that is, all blocks contain the reference structure of the previous block, so that each block set forms a long chain.
[0004] The consensus mechanism refers to when multiple nodes form a network cluster through asynchronous communication. The network is unreliable by default and forms a consistent state through a specific mechanism, namely consensus. The consensus algorithm in this platform adopts PBFT. The PBFT algorithm can tolerate less than 1 / 3 invalid or malicious nodes, realizing the Byzantine problem in the case of a limited number of nodes, with 3f+1 fault tolerance, and at the same time ensuring a certain performance.
[0005] A smart contract is a computer protocol designed to communicate, verify or execute contracts in an information-based manner. Smart contracts allow for trusted transactions without a third party, which are traceable and irreversible. Smart contracts define and execute the items contained in them through code, so there is no need for both parties to establish trust. Once a smart contract is activated, it will be automatically executed. It is completely decentralized and does not rely on a single server but runs automatically through network nodes.
[0006] The number of transactions per second on the blockchain is 7, which is far lower than the transaction speed of the Internet. (2) Decentralization can easily lead to the inability of products based on blockchain technology to form an authoritative credit endorsement. For many current business models, if they are completely based on decentralized technology, there is a huge risk of transformation. In the commercial field, this risk needs special attention. (3) Smart contract security issues. The smart contracts of the blockchain are visible to all users. Therefore, if there are security vulnerabilities on the blockchain, they are prone to malicious attacks and may not be repaired quickly, causing immeasurable losses. Summary of the invention
[0007] The purpose of the present invention is to provide a sharing mechanism based on a blockchain distributed database, which reduces security vulnerabilities from malicious attacks and improves the generation time of the blockchain.
[0008] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solutions:
[0009] 1. A sharing method based on a blockchain distributed database, characterized in that it includes the following steps:
[0010] 1) Data layer: Collect and store data flows in the network under the data monitoring platform, capture data packets, select one of the multiple servers as the designated server as the storage unit, select Ethereum for construction, and use the Ethereum client to build a decentralized network to support smart contract interaction and information storage;
[0011] 2) Network layer: Use the token of the http protocol for encapsulation. When receiving the encapsulation instruction, match a logical parameter corresponding to the instruction. Match the client during the network layer encapsulation process. Access the communication terminal through the client. The address of the access data packet is the internal IP address of the communication terminal. The internal IP address includes a common address and two backup addresses. Then input the input data into the network model to obtain the output data.
[0012] 3) Consensus layer: After the block passes the consensus verification of the first-level consensus layer, it will be confirmed by POW consensus and POS consensus in the second-level consensus layer. The second-level consensus layer POW consensus is set with M nodes, and the POS consensus is set with N nodes. Mx or Ny is selected as one of the main nodes from M nodes and N nodes respectively. Then, the Mx or Ny node is packaged into blocks through the request of the first-level consensus and fed back to the POW consensus and POS consensus respectively. Then, the Byzantine Fault Tolerant BFT consensus algorithm is used to form a data consensus of each blockchain under the premise of decentralization and perform encapsulation processing.
[0013] According to the above features, in the step 1), a network connection is established through the Ethereum client using specific storage instructions in the data layer.
[0014] In some examples, the logic parameters in step 2) are to set the initial Ncs parameters, and the terms are set as design parameters to adapt to different usage requirements. The errors of the parameters are calculated and fuzzified to convert them into corresponding logic.
[0015] Based on the above characteristics, modules are deployed on the blockchain, allowing users to achieve visual deployment on the blockchain platform, select the underlying chain building architecture, and build a blockchain platform with a shared underlying chain building architecture for all participants.
[0016] In some examples, transaction data is obtained by using the data block output data of the server, and the transaction data includes 1 or n transaction attributes, and the n transaction attributes are formed into nm data blocks through a hash algorithm, where 1≤nm≤2, and the n transaction data are formed into a query function through a hash algorithm.
[0017] According to the above characteristics, the encryption transmission module is obtained through the TCP protocol, the data is encrypted with the private key, and then decrypted with the public key. The computer client response header is used to return the current version of the client public key. The public key is updated every 3 to 6 months, and the client is updated every 8 to 10 months. Each update of the client corresponds to a corresponding public key.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] 1) The sharing mechanism based on the blockchain distributed database of the present invention relies on the technical advantages of blockchain technology such as data disclosure, non-tamperability, digital authentication, and record retention to realize the registration of market members and the management and control of electronic contracts in the power trading business process, and to realize the storage and chain of market member and electronic contract data.
[0020] 2) The present invention realizes the transformation of traditional account and password login into digital identity authentication based on the sharing mechanism of blockchain distributed database, realizes the rapid authentication and verification of market member registration, realizes real-time monitoring of power trading process, and completely solves the business pain points of low efficiency and error-prone manual verification of market members, and realizes the business goal of traceability and non-tamperability of electronic contract data on-chain.
[0021] 3) The sharing mechanism based on the blockchain distributed database of the present invention realizes data traceability and query based on blockchain technology through real-time display and data verification of market member information and transaction electronic contracts, providing technical guarantee for the development of power trading business. DETAILED DESCRIPTION
[0022] Embodiments of the present invention will be described in more detail below. However, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art. Those skilled in the art can obtain alternative technical solutions from the following description without departing from the spirit and scope of the present invention. Example
[0023] 1. A sharing method based on a blockchain distributed database, characterized in that it includes the following steps:
[0024] 1) Data layer: Under the data monitoring platform, the data flow in the network is collected and stored, and the data packets are captured. One of the multiple servers is selected as a designated server as a storage unit, and Ethereum is selected for construction. The Ethereum client is used to build a decentralized network to support smart contract interaction and information storage; the data layer uses a specific storage instruction Ethereum client to establish a network connection.
[0025] 2) Network layer: Use the token of the http protocol for encapsulation. When receiving the encapsulation instruction, match a logical parameter corresponding to the instruction. Match the client during the network layer encapsulation process. Access the communication terminal through the client. The address of the access data packet is the internal IP address of the communication terminal. The internal IP address includes a common address and two backup addresses. Then input the input data into the network model to obtain the output data. The logical parameter is to set the initial Ncs parameter, and set the term as the design parameter to adapt to different usage requirements. The error of the calculated parameter is fuzzy processed to convert it into the corresponding logic.
[0026] 3) Consensus layer: After the block passes the consensus verification of the first-level consensus layer, it will be confirmed by POW consensus and POS consensus in the second-level consensus layer. The second-level consensus layer POW consensus is set with 5 nodes, and the POS consensus is set with 6 nodes. One of the master nodes is selected from the 5 nodes and 6 nodes respectively, and then one of the nodes is packaged into a block through the request of the first-level consensus and fed back to the POW consensus and POS consensus respectively. Then, the Byzantine Fault Tolerant BFT consensus algorithm is used to form a data consensus of each blockchain under the premise of decentralization and perform encapsulation processing.
[0027] Deploy modules on the blockchain so that users can achieve visual deployment on the blockchain platform, select the bottom chain building architecture, and build a blockchain platform with a bottom chain building architecture shared by all participants. Use the server's data block output data to obtain transaction data, which includes 1 or 5 transaction attributes. The n transaction attributes form a data block through a hash algorithm, and the 5 transaction data form a query function through a hash algorithm. Obtain the encryption transmission module through the TCP protocol, encrypt the data with a private key, decrypt it with a public key, and use the computer client response header to return the current version of the client public key. Update the public key every 3 months, and update the client every 8 months. Each update of the client corresponds to a corresponding public key. Example
[0028] 1. A sharing method based on a blockchain distributed database, characterized in that it includes the following steps:
[0029] Step 1) and step 2) are the same as in Example 1.
[0030] 3) Consensus layer: After the block passes the consensus verification of the first-level consensus layer, it will be confirmed by POW consensus and POS consensus in the second-level consensus layer. The second-level consensus layer POW consensus is set with 6 nodes, and the POS consensus is set with 7 nodes. One of the main nodes is selected from the 6 nodes and 7 nodes respectively, and then one of the nodes is packaged into a block through the request of the first-level consensus and fed back to the POW consensus and POS consensus respectively. Then, the Byzantine Fault Tolerant BFT consensus algorithm is used to form a data consensus of each blockchain under the premise of decentralization and perform encapsulation processing.
[0031] Deploy modules on the blockchain so that users can achieve visual deployment on the blockchain platform, select the bottom chain building architecture, and build a blockchain platform with a bottom chain building architecture shared by all participants. Use the data block output data of the server to obtain transaction data, which includes 1 or 6 transaction attributes. The n transaction attributes form 2 data blocks through the hash algorithm, and the 6 transaction data form a query function through the hash algorithm. Obtain the encryption transmission module through the TCP protocol, encrypt the data with the private key, decrypt it with the public key, and use the computer client response header to return the current version of the client public key. Update the public key every 6 months, and update the client every 10 months. Each update of the client corresponds to a corresponding public key.
[0032] The above description is only a specific implementation mode of the present disclosure, but the protection scope of the embodiments of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes, replacements or combinations within the technical scope disclosed in the embodiments of the present disclosure or under the ideas disclosed in the embodiments of the present disclosure, which should be included in the protection scope of the embodiments of the present disclosure.
Claims
1. Sharing method based on blockchain distributed database, Features The steps include: 1) Data layer: Collect and store data flows in the network under the data monitoring platform, capture data packets, select one of the multiple servers as the designated server as the storage unit, select Ethereum for construction, and use the Ethereum client to build a decentralized network to support smart contract interaction and information storage; 2) Network layer: Use the token of the http protocol for encapsulation. When receiving the encapsulation instruction, match a logical parameter corresponding to the instruction. Match the client in the process of network layer encapsulation. Access the communication terminal through the client. The address of the access data packet is the internal IP address of the communication terminal. The internal IP address includes a common address and two backup addresses. Then input the input data into the network model to obtain the output data. The logical parameter is to set the initial Ncs parameter, and set the term as the design parameter to adapt to different usage requirements. The error of the calculated parameter is fuzzy processed to convert it into the corresponding logic. 3) Consensus layer: After the block passes the consensus verification of the first-level consensus layer, it will be confirmed by POW consensus and POS consensus in the second-level consensus layer. The second-level consensus layer POW consensus is set with M nodes, and the POS consensus is set with N nodes. Mx or Ny is selected as one of the main nodes from M nodes and N nodes respectively. Then, the Mx or Ny node is packaged into blocks through the request of the first-level consensus and fed back to the POW consensus mechanism and POS consensus mechanism for verification. Then, the Byzantine Fault Tolerant BFT consensus algorithm is adopted to form a data consensus of each blockchain under the premise of decentralization and perform encapsulation processing.
2. According to the sharing method based on blockchain distributed database according to claim 1, Features In the step 1), a network connection is established through an Ethereum client using specific storage instructions in the data layer.
3. According to the sharing method based on blockchain distributed database according to claim 1, Features Deploying modules on the blockchain allows users to achieve visual deployment on the blockchain platform, select the underlying chain building architecture, and build a blockchain platform with a shared underlying chain building architecture for all participants.
4. According to the sharing method based on blockchain distributed database according to claim 1, Features The server is used to output data in the form of data blocks to obtain transaction data, wherein the transaction data includes 1 or n transaction attributes, the n transaction attributes are formed into nm data blocks through a hash algorithm, wherein 1≤nm≤2, and the n transaction attributes are formed into a query function through a hash algorithm.
5. According to the sharing method based on blockchain distributed database according to claim 1, Features Obtain the encrypted transmission module through the TCP protocol, encrypt the data with the private key, decrypt it with the public key, and use the computer client response header to return the current version of the client public key. Update the public key every 3 to 6 months, and update the client every 8 to 10 months. Each time the client is updated, the corresponding public key is updated.
Citation Information
Patent Citations
Network layer ICD packaging method and device
CN106874009A
Data sharing methods and data sharing network based on block chain and electronic equipment
CN109450910A
