CN109584071B - Block chain processing method and electronic equipment - Google Patents
Block chain processing method and electronic equipment Download PDFInfo
- Publication number
- CN109584071B CN109584071B CN201811431220.4A CN201811431220A CN109584071B CN 109584071 B CN109584071 B CN 109584071B CN 201811431220 A CN201811431220 A CN 201811431220A CN 109584071 B CN109584071 B CN 109584071B
- Authority
- CN
- China
- Prior art keywords
- chain
- data
- block
- handed
- linked
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/42—Confirmation, e.g. check or permission by the legal debtor of payment
Landscapes
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Development Economics (AREA)
- Economics (AREA)
- Marketing (AREA)
- Technology Law (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to a block chain processing method and an electronic device, comprising the following steps: receiving data; storing data onto a blockchain; wherein, the block chain comprises: a main chain and a side chain; the side chains are linked with the main chain or linked between the side chains; the main chain and the side chain are both double-helix molecular structure block chains; the double-spiral molecular structure block chain comprises a left-handed chain and a right-handed chain, the left-handed chain and the right-handed chain respectively comprise at least one block, the left-handed chain is used as a block database, and the right-handed chain is used as a local account transaction database; the block comprises a bridging block, and a levorotation chain and a dextrorotation chain in the same double-helix molecular structure block chain are linked through the bridging block, or a main chain and a side chain are linked, or different side chains are linked. By adopting a main chain and a side chain structure for the block chain and adopting a double-helix molecular structure for the main chain and the side chain, distributed computation, distributed storage and distributed application of data are realized, and an asset and data module is quickly created.
Description
Technical Field
The present application relates to the field of data storage, and in particular, to a block chain processing method and an electronic device.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain is an important concept of bitcoin, which is essentially a de-mediated database, and as an underlying technology of bitcoin, is a series of data blocks generated by correlation by using a cryptographic method, wherein each data block contains information of one bitcoin network transaction for verifying the validity of the information and generating a next block.
In the related technology, the block chain technology data volume is larger and larger, only full backup storage is available, the main chain is overstaffed due to interactive deployment of intelligent contracts on the main chain, an on-chain auditing mechanism lacks in industry, the difficulty of migrating enterprise-level applications to a block chain platform is high, the assets are single and difficult to exchange, the data processing capacity is low, and the like.
Disclosure of Invention
To overcome at least some of the problems in the related art, the present application provides a block chain processing method and an electronic device.
According to a first aspect of embodiments of the present application, there is provided a block chain processing method, including: receiving data;
storing the data onto a blockchain;
wherein the blockchain comprises: a main chain and a side chain;
the side chain is linked to the main chain or linked between the side chains;
the main chain and the side chain are both double-helix molecular structure block chains;
the double-helix molecular structure block chain comprises a left-handed chain and a right-handed chain, the left-handed chain and the right-handed chain respectively comprise at least one block, the left-handed chain is used as a block database, and the right-handed chain is used as a local account transaction database;
the block comprises a bridging block, and a left-handed chain and a right-handed chain in the same double-spiral molecular structure block chain are linked through the bridging block, or a main chain and a side chain are linked, or different side chains are linked.
Optionally, the block chain further includes: and the test chain is linked with the side chain through a bridge block and is used for running test data.
Optionally, the side chain comprises: private and industrial chains for running audit-passed applications, the side chains being partially decentralized.
Optionally, the main chain and the side chain adopt the following consensus mechanism:
adopting SHA256 function to carry out workload certification;
the method for determining the consensus node by adopting the work rotation certification algorithm specifically comprises the following steps:
randomly rotating part of nodes as current nodes in all the nodes which can be used as consensus nodes;
if the current node agrees with the current mining difficulty and does not exceed the preset allowed continuous times, determining the current node as a consensus node, wherein the current mining difficulty is generated according to a preset algorithm after last rotation, and an initial value of the mining difficulty is a preset value;
rewarding the consensus nodes by adopting a system contribution algorithm, wherein the parameters of the system contribution algorithm comprise: the contribution value of the current consensus node to the network, the current network POW difficulty and the contribution time of the current consensus node.
Optionally, the method further includes:
and performing authority control by adopting the consensus mechanism, wherein the authority comprises one or more of the following items:
the method comprises the steps of creating, sending and checking data, and commonly recognizing and mining nodes, wherein the data comprises the following steps: account transactions and non-account transactions.
Optionally, the method further includes:
a data module is created within a block of the left-handed chain to store a larger amount of data than the large volume of data of the account transaction through the data module.
Optionally, the large volume data includes one or more of the following items: video data, audio data, picture data.
Optionally, the method further includes:
and when the data is a large data item, storing the data to a peer-to-peer file sharing platform outside the blockchain, wherein the large data item is data of which the data volume exceeds the storage capacity of a block on the blockchain.
Optionally, the peer-to-peer file sharing platform includes: and (4) IPFS.
According to a second aspect of embodiments of the present application, there is provided an electronic apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method according to any of the first aspect of the embodiments of the present application.
The technical scheme provided by the application can comprise the following beneficial effects:
by adopting a main chain and a side chain structure for the block chain and adopting a double-helix molecular structure for the main chain and the side chain, distributed computation, distributed storage and distributed application of data are realized, and an asset and data module is quickly created.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
Fig. 1 is a flowchart of a block chain processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a hash algorithm according to an embodiment of the present application;
FIG. 3 is a flow chart of a work rotation proof algorithm provided by one embodiment of the present application;
FIG. 4 is a flow diagram of out-of-block-chain application data storage provided by one embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Fig. 1 is a flowchart of a block chain processing method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
s11: receiving data;
s12: storing the data onto the main chain and the side chains;
wherein the side chains are linked to the main chain or between the side chains;
the main chain and the side chain are both double-helix molecular structure block chains;
the double-helix molecular structure block chain comprises a left-handed chain and a right-handed chain, the left-handed chain and the right-handed chain respectively comprise at least one block, the left-handed chain is used as a block database, and the right-handed chain is used as a local account transaction database;
the block comprises a bridging block, and a left-handed chain and a right-handed chain in the same double-spiral molecular structure block chain are linked through the bridging block, or a main chain and a side chain are linked, or different side chains are linked.
It should be noted that the blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. The block chain (Blockchain) is an important concept of bitcoin, which is essentially a de-mediated database, and is used as the underlying technology of the bitcoin, and is a series of data blocks which are generated by using a cryptographic method to be related, wherein each data block contains information of one bitcoin network transaction, and the information is used for verifying the validity of the information and generating the next block.
The side chains share the burden of the main chain, most of the applications run on the side chains, the main chain is reliable and stable, the method is flexible and convenient, and meanwhile Decentralized Application (DAPP) is more efficient. The main chain is the core Of the method and is used for maintaining token operation, decentralization, a consensus mechanism adopts an optimized POW (Proof Of Work) algorithm, each node Of the main chain can freely join and leave the network and participate in reading and writing Of data on the chain, the nodes are interconnected and intercommunicated in a flat topological structure during operation, and no centralized service end node exists in the network. The intelligent contract is the core application of the main chain and is also the basis of automation and intelligence.
The main chain and the side chain adopt a double-helix molecular structure, and the bottom layer chain forming technology of the block chain is converted from a single flat block chain to the block chain with the double-helix molecular structure, and is similar to the structure of human DNA (Deoxyribonucleic acid). Each group of chains is divided into a left-handed chain and a right-handed chain, the left-handed chain is taken as a main-handed chain, is full backup data of a block chain, and at least comprises one block in the following items: the root block, the chain block and the bridging block; the right-handed chain is a secondary chain and at least comprises one block of the following items: root block, this chain block, aggregate block, bridging block, application block.
Furthermore, the root block is the first chain block generated by each group of double-spiral chains, namely a founder block; the chain block is a common block and is similar to the existing bitcoin and Ethengfang blocks; an aggregation block is an aggregation of common blocks over a period of time, where the aggregation is not a collection of data but a collection of data validations; the bridging block is a bridging block of the left-handed chain and the right-handed chain, is also a bridging block of the public chain and the side chain, bears the protocol connection and communication functions between the chains, and is also a channel of an intelligent contract; the application block is a block suitable for development and application based on the method, mainly existing in the side chain, and intelligent contract and protocol communication are executed through the bridge block.
In the embodiment, the block chain adopts a main chain and a side chain structure, and the main chain and the side chain adopt a double-helix molecular structure, so that distributed computation, distributed storage and distributed application of data are realized, and an asset and data module is quickly created.
Further, the block chain further includes: and the test chain is linked with the side chain through a bridge block and is used for running test data.
In some embodiments, the side chain comprises: private and industrial chains for running audit-passed applications, the side chains being partially decentralized.
It should be noted that the side chains are divided into private chains and industry chains, which are not completely decentralized, and the private chain application and the industry chain application may be provided with a regional center. An application developer may choose to run the application in a private chain or an industry chain.
Further, the industry chain, also known as industry alliance chain: each node of the industry chain usually has a corresponding entity organization, and can join and leave the network only after authorization. Organizations form a federation with interest, and maintain healthy operation of block chains together, and the consensus mechanism adopts an optimized POS (proof of interest) mechanism.
Private chain: the writing authority of each node of the private chain is controlled internally, and the reading authority is selectively opened outwards according to the requirements. The private chain still has a general structure of block chain multi-node operation, is suitable for internal data management and audit of a specific mechanism, and adopts an optimized POS mechanism as a common mechanism.
In this embodiment, the side chains include a private chain and an industry chain, and the application developer can choose to run the application on the private chain or the industry chain, so as to facilitate classification and differentiation.
In some embodiments, the backbone and the side chain employ a consensus mechanism as follows:
adopting SHA (Secure Hash Algorithm ) 256 function to carry out workload certification;
determining a consensus node by adopting a work alternation certification algorithm, which specifically comprises the following steps:
randomly rotating part of nodes as current nodes in all the nodes which can be used as consensus nodes;
if the current node agrees with the current mining difficulty and does not exceed the preset allowed continuous times, determining the current node as a consensus node, wherein the current mining difficulty is generated according to a preset algorithm after last rotation, and an initial value of the mining difficulty is a preset value;
rewarding the consensus nodes by adopting a system contribution algorithm, wherein the parameters of the system contribution algorithm comprise: the contribution value of the current consensus node to the network, the current network POW difficulty and the contribution time of the current consensus node.
It should be noted that the consensus mechanism is an algorithm for achieving distributed consensus by a block chain transaction, and the transaction is verified and confirmed within a short time by voting of a special node; for a transaction, if several nodes with irrelevant benefits can achieve consensus, we can consider that the whole network can achieve consensus for the node.
SHA is a class of cryptographic hash functions promulgated by the national institute of standards and technology. The hash value is used as a unique value of a fixed size representing a large amount of data. A small change in data can produce an unpredictable large number of changes in the hash value. The SHA256 algorithm is one type of cluster of SHA2 algorithms. For messages with a length of less than 264 bits, the SHA256 will generate a message digest of 256 bits. SHA256 has the general characteristics of a cryptographic hash function. SHA256 is the primary cryptographic hash function used to construct the blockchain. Whether the header information of the block or the transaction data is used, the hash function is used for calculating the hash value of the related data so as to ensure the integrity of the data. Meanwhile, in the E-SEA system, based on searching SHA256 hash value of a given prefix, a consensus mechanism of workload certification is designed; SHA256 is also used to construct addresses, i.e. to identify different users. SHA256 is an iterative hash function of an iterative structure (Merkle-Damgard), and the calculation process is divided into two stages: pre-processing and main-loop of the message. In the preprocessing stage of the message, the filling and expanding filling of the message are mainly completed, the input original message is converted into n message blocks with 512 bits, then each message block is processed by using a SHA256 compression function, and the calculation flow of SHA256 is shown in fig. 2. The calculation process is an iterative calculation process, and when the last 1 message block, i.e. the nth block, is processed, the final output value is the SHA256 value of the input original message.
A Rotation work Rotation proof algorithm and a contribution algorithm of a contibute system are added in the consensus node determined by the work Rotation proof algorithm. The Rotation work Rotation proving algorithm is used for conducting approval transaction on random Rotation part common identification nodes in network common identification nodes, a mining difficulty is proposed in the next Rotation, the nodes which recognize the mining difficulty become next Rotation confirmation nodes and are recorded, meanwhile, mining limits are set, and the same node cannot continuously participate in Rotation mining for multiple times. This configuration allows more miners to participate in transaction approval, saving resources while ensuring that there is no fixed, potentially disrupted, verification sequence. As shown in fig. 3, it is a flowchart of Rotation work Rotation certification algorithm, where N is the current batch, and N is a Rotation batch divided according to the total amount of the current consensus node.
The contribution algorithm of the contibute system is that in the consensus mechanism, resources such as bandwidth and hard disk contributed by the nodes participating in the consensus are digitally quantized, and the system gives a certain amount of rewards according to the contribution amount. The contribution algorithm formula of the Contribute system is as follows:
where C is the contribution award, N m The reward upper limit is a constant determined by the current network condition and the number of the consensus nodes;is a vector, representing the bandwidth contribution,is a vector, representing the hard disk contribution,for the current difficulty of POW it is,in order to contribute to the time,for the digitally quantized bandwidth contribution value,contributes values to the digitally quantized hard disk. ρ = (ρ) p ,ρ s ,ρ zf ) The weight of the reward is obtained by difficulty, time and contribution. It can be seen from the formula that the benefit to be obtained by the consensus node depends on the contribution value of the current node to the network, the current difficulty of the network POW, and the contribution time of the current consensus node.
In the embodiment, the SHA256 function is adopted for workload certification, and the work rotation certification algorithm is adopted for determining the consensus nodes, so that the condition that the consensus mechanism has high requirements on computing power and a network environment is met, and the resource consumption is reduced.
In some embodiments, the backbone and the side chain employ a consensus mechanism that further comprises:
and performing authority control by adopting the consensus mechanism, wherein the authority comprises one or more of the following items:
the method comprises the following steps of creating, sending and checking data, and commonly recognizing and mining nodes, wherein the data comprises the following steps: account transactions and non-account transactions.
It should be noted that, the method also includes a permission mechanism, which can perform consensus permission restriction, for example, each main node in the federation chain can control permissions such as creation and adding consensus to other nodes in a consensus manner.
The authority control mainly comprises the authority of creation, sending and checking of assets and data, consensus of nodes, mining and the like, and can be configured through initialization parameters of chains, so that various authority requirements under different application scenes are guaranteed. The authority control is completed based on a consensus mechanism, the goal of authority control is achieved by voting of the consensus mechanism, and meanwhile, the owner of the asset and data module has the highest authority of the asset or data, but the normal transaction or writing and reading of the asset or data cannot be limited. The asset and data modules cannot be deleted or destroyed once created.
In the embodiment, the authority control is performed through a consensus mechanism, and the property and data owner has the highest authority of the property or data, so that the rights and interests of the owner are guaranteed, and meanwhile, the reliability of the property and data is guaranteed.
In some embodiments, the method further comprises:
a data module is created within a block of the left-handed chain to store a larger amount of data than the large volume of data of the account transaction through the data module.
Further, the large volume data includes one or more of: video data, audio data, picture data.
It should be noted that the left-handed chain can implement full backup storage of the same data. The wallet owner can select a synchronous public chain, an industry chain, a private chain and a test chain when synchronizing data, and then further select a synchronous left-handed chain or a synchronous right-handed chain, if the synchronous left-handed chain is the same as the current bit currency and Ethernet lane wallets, a large amount of time and disk resources are consumed, and meanwhile, the contribution to the chain is larger than that of the synchronous right-handed chain. In addition, the user who selects the synchronous right-handed chain can obtain better experience, but cannot obtain the storage capacity token distributed by the system, the user who selects the synchronous right-handed chain requests data to the left-handed chain, similar to the existing light wallet user, when a transaction behavior occurs, the data of an account related to the transaction behavior can be obtained when a certain number of left-handed chain users are confirmed, the transaction behavior is completed, and meanwhile, the confirmed left-handed chain users are given to obtain a certain transaction income. Meanwhile, due to the design of the bridging block, the direct connection between the main chain and the side chain and the direct connection between the left-handed chain and the right-handed chain are completed, the burden of the main chain is reduced, and the operation efficiency is improved.
The left-handed chain can realize the full backup storage of the same data, and the right-handed chain and the application blocks outside the chain can realize the distributed fragmented storage of the same data. The proposal based on the developer of the application is given in the concrete implementation: in the block chain technology, due to the blocking mechanism, it is difficult to store a large amount or mass of data in principle, so an enterprise needs to be careful when selecting the block chain for storage, and in principle, the block chain should record-type data which can not be changed or need not be changed, such as bidding process records, digital currency transaction records, passenger ticket booking records and the like, and other data which can be updated and changed at any time can be better stored in the database of the enterprise, so that the method provides an enterprise block chain solution and a distributed fragmented storage solution which are provided with a regional center on a side chain during design, and can meet the requirement that large-scale applications of enterprises and industrial users migrate to the block chain. Distributed fragmented storage mainly occurs in private and industrial chains, and is implemented by a combination of an application block and a bridge block, similar to a software implementation of Raid (Redundant Arrays of Independent Drives) design of traditional storage, such as Raid0:1+2+3 \ 8230, + k = Data, the same Data is split into a plurality of parts for scattered storage, the reading speed is improved, the backup function is not provided, any part of Data is lost, and the whole Data cannot be recovered; raid1:2Data, copy 2 copies and store the same Data, unless every Data is lost, the Data can be recovered; and Raid5:1+2+3+ \ 8230, K + (1 &2&3 &8230; & K), the same data is split into a plurality of parts, the last part has the effect of splitting the data in the front, and the lost data of any part can be recovered; on the distributed fragmentation storage of data, it is suggested to adopt n × Raid5, namely n × Raid1 mode, i.e. firstly, the data is split into multiple shares, and the last share contains the verification of the split data before, and then the data is stored on the block chain network after being encrypted. Thereby enabling fragmented storage of data. The user 1 stores 1# data of the first data, 7# data of the second data, validation data of the third data, no. 8 data of the N data and the like; each data is provided with a plurality of backups according to the number of users on the network, so that safety is guaranteed, different data are applied based on different block chains, and an application user is also a data keeper at the same time, obtains related benefits and maintains the integrity and the healthy development of the corresponding chains together.
The intelligent contract interaction is realized through the data module and the intelligent filtering engine, the main chain and the side chain are realized through a bridging block bridging technology, the protocol connection and the communication function of a left-hand chain and a right-hand chain are realized, the size of the main chain is reduced to the maximum extent, the gradual expansion of the range of future application is facilitated, the development of a block chain is facilitated, meanwhile, the application is deployed on the relatively independent side chain, namely a private chain and an industrial chain, the problem of the side chain occurs, the operation of the main chain cannot be influenced, the safety of the main chain can be ensured, meanwhile, a code auditing mechanism is added for the application, the application which is audited through organization is only allowed to be issued to the side chain, the mechanism is similar to that of an apple shop, and therefore the stability of the main chain and the safety of a system are ensured to the maximum extent.
In the embodiment, the data module is created in the left-handed chain to store large-capacity data, so that the load of the main chain can be reduced, and the operation efficiency is improved.
In some embodiments, the method further comprises:
and when the data is a large data item, storing the data to a peer-to-peer file sharing platform outside the blockchain, wherein the large data item is data of which the data volume exceeds the storage capacity of a block on the blockchain.
Further, the peer-to-peer file sharing platform comprises: IPFS (InterPlanetary File System).
It should be noted that, as shown in fig. 4, in order to avoid the centering risk that may occur in the process of combining the IPFS and the block chain, the following method is required: the publishing node writes the new data into its local store, chunks the large project, automatically constructs a transaction for the data outside the publishing chain, which is signed and broadcast to the network, propagates between nodes and enters the blockchain in the usual way. When a data demand node needs a reference to data out of the chain, a HASH request for the data is added to its search queue and used as a background process, if the HASH exists in the search queue of the node, a query is sent to the network to find the block identified by the HASH. These queries propagate to other nodes in the network in a point-to-point fashion. Any node with data can respond and the response is relayed to the user along the same path as the query. If no node answers the query, the HASH query request will be returned to the queue for later retry. If no node responds for a long time, the demand node will send the request to the network again. If the node receives the request, the receiving node verifies the size and the HASH value of the data according to the request and sends corresponding data, and after the data are detected, the receiving node writes the data into a local storage so that the data can be immediately used for retrieval through an Application Programming Interface (API). If the content of the request is not received, or does not match the desired HASH or size, the request is returned to the queue for retrieval by the demand node from other sources.
In a network with a shorter delay, a smaller amount of offline data will be transmitted at the instant of the referral transaction. For high-load applications, the method supports more than 1200 out-of-chain items or retrieves 30MB out-of-chain data network connection per second, and the maximum 1000MB out-of-chain data can be normally transmitted without affecting the network efficiency of the method.
The data module can be set to be stored as a common data module, an application data module and a mixed data module, the latter two modules can store information such as HASH, a publisher and an index of the data block outside the chain, and rapid retrieval and distribution of the data block outside the chain can be realized.
The intra-chain data size single block is limited to 16M, beyond which 16M may be stored as an out-of-chain data block.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the apparatus includes:
a processor 51;
a memory 52 for storing processor-executable instructions;
wherein the processor is configured to: performing a method as described in any of the embodiments of the present application.
It should be noted that the processor model is not limited, the memory model is not limited, and the memory is a memory device used for storing information in modern information technology.
In this embodiment, an electronic device is provided, which executes any one of the methods in the above embodiments.
With regard to the apparatus in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried out in the method of implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (10)
1. A method for processing a block chain, comprising:
receiving data;
storing the data onto a blockchain;
wherein the blockchain comprises: a main chain and a side chain;
the side chain is linked to the main chain or linked between the side chains;
the main chain and the side chain are both double-helix molecular structure block chains;
the double-helix molecular structure block chain comprises a left-handed chain and a right-handed chain, the left-handed chain and the right-handed chain respectively comprise at least one block, the left-handed chain is used as a block database, and the right-handed chain is used as a local account transaction database;
the block comprises a bridging block, and a left-handed chain and a right-handed chain in the same double-spiral molecular structure block chain are linked through the bridging block, or a main chain and a side chain are linked, or different side chains are linked.
2. The method of claim 1, wherein the blockchain further comprises: and the test chain is linked with the side chain through a bridge block and is used for running test data.
3. The method of claim 1, wherein the side chain comprises: private and industrial chains for running audit-passed applications, the side chains being partially decentralized.
4. The method of claim 1, wherein the backbone and the sidechains employ a consensus mechanism as follows:
adopting SHA256 function to carry out workload certification;
the method for determining the consensus node by adopting the work rotation certification algorithm specifically comprises the following steps:
randomly rotating part of nodes as current nodes in all nodes which can be taken as consensus nodes;
if the current node agrees with the current mining difficulty and does not exceed the preset allowed continuous times, determining the current node as a consensus node, wherein the current mining difficulty is generated according to a preset algorithm after last rotation, and an initial value of the mining difficulty is a preset value;
rewarding the consensus nodes by adopting a system contribution algorithm, wherein the parameters of the system contribution algorithm comprise: the contribution value of the current consensus node to the network, the current network POW difficulty and the contribution time of the current consensus node.
5. The method of claim 4, further comprising:
and performing authority control by adopting the consensus mechanism, wherein the authority comprises one or more of the following items:
the method comprises the following steps of creating, sending and checking data, and commonly recognizing and mining nodes, wherein the data comprises the following steps: account transactions and non-account transactions.
6. The method of claim 1, further comprising:
and creating a data module in the block of the left-handed chain so as to store large-volume data with a data volume larger than the account transaction through the data module.
7. The method of claim 6, wherein the large volume of data comprises one or more of: video data, audio data, picture data.
8. The method of claim 1, further comprising:
and when the data is a large data item, storing the data to a peer-to-peer file sharing platform outside the blockchain, wherein the large data item is data of which the data volume exceeds the storage capacity of a block on the blockchain.
9. The method of claim 8, wherein the peer-to-peer file sharing platform comprises: and (4) IPFS.
10. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to: performing the method of any one of claims 1-9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811431220.4A CN109584071B (en) | 2018-11-28 | 2018-11-28 | Block chain processing method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811431220.4A CN109584071B (en) | 2018-11-28 | 2018-11-28 | Block chain processing method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109584071A CN109584071A (en) | 2019-04-05 |
CN109584071B true CN109584071B (en) | 2023-01-10 |
Family
ID=65924626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811431220.4A Active CN109584071B (en) | 2018-11-28 | 2018-11-28 | Block chain processing method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109584071B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110827034B (en) * | 2019-10-31 | 2021-10-22 | 支付宝(杭州)信息技术有限公司 | Method and apparatus for initiating a blockchain transaction |
CN111159283B (en) * | 2019-11-25 | 2023-08-22 | 东软集团股份有限公司 | Method, device and equipment for merging blocks in block chain |
CN111625598B (en) * | 2020-05-15 | 2023-08-25 | 南京东垚建筑科技研究院有限公司 | Engineering collaboration block chain data structure and application method |
CN111832001B (en) * | 2020-07-20 | 2024-05-24 | 国家信息中心 | Identity management method and identity management system based on block chain |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107169865B (en) * | 2017-04-24 | 2021-06-29 | 北京果仁宝科技有限公司 | Asset data processing system based on block chain technology |
CN107464106B (en) * | 2017-07-25 | 2021-01-26 | 北京果仁宝科技有限公司 | Method and system for transaction between main chain and side chain of block chain |
-
2018
- 2018-11-28 CN CN201811431220.4A patent/CN109584071B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109584071A (en) | 2019-04-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109584071B (en) | Block chain processing method and electronic equipment | |
TWI721699B (en) | System and method for parallel-processing blockchain transactions | |
US10657526B2 (en) | System and method to dynamically setup a private sub-blockchain based on agility of transaction processing | |
US11405181B2 (en) | Lightweight blockchain based on split-trust | |
WO2020107919A1 (en) | Distributed network and ecosystem based on innovative proof-of-reputation consensus protocol | |
KR20210003234A (en) | Maintaining blocks of a blockchain in a segmented blockchain network | |
CN110275891B (en) | Artificial intelligence software market | |
JP2018166000A (en) | Hierarchical network system, and node and program used in the same | |
CN110866751A (en) | Block chain parallel chain maintenance method and block chain parallel chain | |
CN108985774A (en) | A kind of motivational techniques, device, equipment and the storage medium of block chain network | |
CN108985772A (en) | A kind of verification method, device, equipment and the storage medium of block chain | |
MX2011010287A (en) | Differential file and system restores from peers and the cloud. | |
CN109302495A (en) | A kind of date storage method and device | |
CN114982193A (en) | Digital contracts using blockchain transactions | |
TW201216073A (en) | System and method for sharing network storage and computing resource | |
CN113508570B (en) | Method for sharing and verifying blocks and electronic documents among nodes in block chain | |
CN113994324B (en) | Block chain system with efficient world state data structure | |
US20230120476A1 (en) | Methods and systems for creation and distribution of non-fungible tokens | |
CN115769206A (en) | Cryptographic data entry blockchain data structure | |
CN114175011A (en) | Block chain system with efficient world state data structure | |
Yin et al. | A blockchain-based storage system with financial incentives for load-balancing | |
Nikolaidis et al. | Privacy preserving distributed training of neural networks | |
Turesson et al. | Privacy preserving data mining as proof of useful work: Exploring an AI/Blockchain design | |
KR20220148397A (en) | A neural consensus proof based block chain network platform system constructed by using a non-random consensus proof-based blockchain network | |
KR20210077133A (en) | A Program for Blockchain Network Operation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |