Block chain-based data uplink method and device

文档序号:1832502 发布日期:2021-11-12 浏览:13次 中文

阅读说明:本技术 基于区块链的数据上链方法及装置 (Block chain-based data uplink method and device ) 是由 过晓冰 郭青霄 于 2021-07-30 设计创作,主要内容包括:本申请实施例公开了一种基于区块链的数据上链方法及装置,其中,所述方法包括:获取第一交易数据;对所述第一交易数据进行上链处理;在所述第一交易数据上链成功的情况下,对所述第一交易数据进行确认共识。(The embodiment of the application discloses a block chain-based data uplink method and a block chain-based data uplink device, wherein the method comprises the following steps: acquiring first transaction data; performing uplink processing on the first transaction data; and under the condition that the first transaction data is successfully linked, performing confirmation consensus on the first transaction data.)

1. A block chain based data uplink method, the method comprising:

acquiring first transaction data;

performing uplink processing on the first transaction data;

and under the condition that the first transaction data is successfully linked, performing confirmation consensus on the first transaction data.

2. The method of claim 1, further comprising:

acquiring second transaction data;

performing a confirmation consensus on the second transaction data;

correspondingly, the confirming and identifying the first transaction data under the condition that the first transaction data is successfully linked up includes:

and under the condition that the first transaction data is successfully linked and the second transaction data completes confirmation consensus, performing confirmation consensus on the first transaction data.

3. The method of claim 2 wherein prior to said uplink processing of said first transaction data, said first transaction data is not confirmed as being agreed upon; after the confirming and identifying the second transaction data, the method further comprises:

performing uplink processing on the second transaction data piece if the second transaction data piece is determined to satisfy a consensus condition;

wherein the first transaction data and the second transaction data have different attribute information.

4. The method of claim 1 wherein, after the uplink processing of the first transaction data, further comprising:

controlling the block link point performing uplink processing on the first transaction data to perform mortgage, so that the service related to the first transaction data can be processed under the condition that the first transaction data is not confirmed to be in common;

returning the mortgage if the first transaction data is confirmed to meet the consensus condition after the mortgage is finished; or the like, or, alternatively,

after the mortgage is completed, if the first transaction data is confirmed not to satisfy the consensus condition, the mortgage is deducted.

5. The method according to any of claims 1 to 4, wherein said uplink processing of said first transaction data comprises:

performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

correspondingly, after the confirming and identifying the first transaction data under the condition that the first transaction data is successfully linked, the method further includes:

if the first transaction data is confirmed to satisfy a consensus condition, the first transaction data is moved from the first data area to a second data area of the designated block.

6. The method of claim 5, further comprising:

under the condition that the first transaction data is successfully linked, acquiring third transaction data; wherein the third transaction data has an association relationship with the first transaction data;

performing uplink processing on the third transaction data, and if the first transaction data is not confirmed to be common, storing the third transaction data in a first data area of a designated block;

associating the first transaction data with the third transaction data.

7. The method of claim 6, wherein after obtaining third transaction data in the event that the first transaction data is successfully linked, further comprising:

and performing uplink processing on the third transaction data, and if the first transaction data is confirmed to meet the consensus condition and the third transaction data does not need to be confirmed and consensus, storing the third transaction data in a second data area of a designated block.

8. The method of claim 7, wherein after obtaining third transaction data in the event that the first transaction data is successfully linked, further comprising:

and performing uplink processing on the third transaction data, and if the first transaction data is confirmed to meet the consensus condition and the third transaction data is not confirmed to be consensus, storing the third transaction data in a first data area of a designated block.

9. The method of claim 1, wherein the confirming consensus is performed on the first transaction data after the first transaction data is successfully uplink-transmitted, further comprising:

if the first transaction data is confirmed not to meet the consensus condition, marking the block where the first transaction data is located to indicate that the first transaction data is invalid.

10. An apparatus for block chain based data uplink, the apparatus comprising:

a first acquisition unit for acquiring first transaction data;

a first uplink unit, configured to perform uplink processing on the first transaction data;

a first consensus unit, configured to perform a confirmation consensus on the first transaction data if the first transaction data is successfully uplink.

Technical Field

Embodiments of the present invention relate to block chain technology, and more particularly, but not exclusively, to a block chain based data uplink method and apparatus.

Background

With the development of internet technology, the blockchain has been widely applied to data storage and interaction due to the advantages of decentralization, openness, security, autonomy, and the like.

The block chain realizes the distributed reliable storage of data, and the consensus mechanism is the core technology of the block chain, and aims at the consistency of the distributed storage of the ledger, mainly the confirmation and arbitration of newly-added ledgers (when a plurality of newly-added ledgers exist, namely the bifurcation), the distribution and the final consistency. A complete consensus mechanism also comprises special conditions of full-amount account book synchronization, exception handling and the like of the new online node.

However, the efficiency of the current consensus algorithm directly restricts the concurrency characteristic of the blockchain network, so that the consensus mechanism is also a hot spot of the current academic and industrial research.

Disclosure of Invention

In view of the above, the present disclosure provides a block chain based data uplink method and apparatus.

The technical scheme of the embodiment of the application is realized as follows:

in a first aspect, an embodiment of the present application provides a block chain-based data uplink method, where the method includes:

acquiring first transaction data;

performing uplink processing on the first transaction data;

and under the condition that the first transaction data is successfully linked, performing confirmation consensus on the first transaction data.

In a second aspect, an embodiment of the present application provides a block chain-based data uplink apparatus, including:

a first acquisition unit for acquiring first transaction data;

a first uplink unit, configured to perform uplink processing on the first transaction data;

a first consensus unit, configured to perform a confirmation consensus on the first transaction data if the first transaction data is successfully uplink.

The embodiment of the application provides a block chain-based data chaining method and device, wherein first transaction data are acquired; performing uplink processing on the first transaction data; and under the condition that the first transaction data is successfully linked, the first transaction data is confirmed and identified, so that a mechanism of subsequent identification can be provided, the data can occupy the linked chain, and the subsequent service requirement is triggered in advance.

Drawings

Fig. 1 is a first flowchart illustrating an implementation of a block chain-based data uplink method according to an embodiment of the present application;

fig. 2 is a flowchart illustrating a second implementation flow of a block chain-based data uplink method according to an embodiment of the present application;

fig. 3 is a third flowchart illustrating an implementation of a block chain-based data uplink method according to an embodiment of the present application;

fig. 4 is a fourth flowchart illustrating an implementation of a block chain-based data uplink method according to an embodiment of the present application;

fig. 5 is a schematic structural diagram of a block chain-based data uplink apparatus according to an embodiment of the present application;

fig. 6 is a schematic hardware entity diagram of a block link point device according to an embodiment of the present disclosure.

Detailed Description

The technical solution of the present application is further elaborated below with reference to the drawings and the embodiments. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.

In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.

It should be noted that the terms "first \ second \ third" referred to in the embodiments of the present application are only used for distinguishing similar objects and do not represent a specific ordering for the objects, and it should be understood that "first \ second \ third" may be interchanged under specific ordering or sequence if allowed, so that the embodiments of the present application described herein can be implemented in other orders than illustrated or described herein.

The embodiment of the present application provides a data uplink method based on a blockchain, where the method is applied to a blockchain node device, and a function implemented by the method may be implemented by a processor in the blockchain node device calling a program code, and certainly, the program code may be stored in a storage medium of the blockchain node device. Fig. 1 is a first flowchart illustrating an implementation process of a block chain-based data uplink method according to an embodiment of the present application, where as shown in fig. 1, the method includes:

step S101, acquiring first transaction data;

here, in the data uplink method provided in the embodiment of the present application, the execution main body may be an uplink device for data to be uplink, or different types of block link point devices such as a server device, a physical host, or a UE (User Equipment) integrated with the uplink device. The blockchain node device can be added into the blockchain platform after being approved and passed through an application program related to the configured blockchain platform. And, the block chain node device is a network-connectable device having a certain storage space, and of course, the block chain node device may also be configured in the form of a device cluster. The UE may be a terminal device such as a smart phone, a tablet computer, a notebook computer, a palm computer, a desktop computer, or a PDA (Personal Digital Assistant).

Of course, the blockchain node device may be any blockchain link node device in a blockchain network, which is not limited in this embodiment of the present application.

In this embodiment of the application, the first transaction data may be any type of transaction data, and the first transaction data may also be transaction data that meets a preset condition. For example, the first transaction data may be data with a high requirement on real-time performance, or data with certain attribute information matched with a preset attribute type.

Step S102, performing uplink processing on the first transaction data;

in the embodiment of the application, after the first transaction data is acquired, the first transaction data is not confirmed and identified, the first transaction data is firstly subjected to uplink processing, and the first transaction data is subsequently confirmed and identified only when uplink processing is successful, namely, the first transaction data is packaged firstly, then uplink processing is performed, and then verification is performed subsequently. Therefore, for some data with high real-time requirement, the uplink can be preempted and the subsequent service requirement is continuously triggered. For example, some services need to be processed after the first transaction data is uplink, if there are many data to be uplink, and each data is verified for a long time, the time for waiting for uplink of the first transaction data is long, and thus if the subsequent service needs to be a service with a high timeliness requirement, the subsequent service will be affected greatly. However, the method in the embodiment of the present application can preempt uplink to trigger the subsequent service requirement in advance. Of course, the subsequent service requirement may be other transactions related to the first transaction, or may be other services related to the first transaction besides the transaction.

Step S103, performing a confirmation consensus on the first transaction data when the uplink of the first transaction data is successful.

Here, the confirming and consensus of the first transaction data refers to confirming whether the first transaction data meets a consensus condition, that is, verifying the authenticity and validity of the first transaction data.

In the embodiment of the application, first transaction data is acquired; performing uplink processing on the first transaction data; and under the condition that the first transaction data is successfully linked, the first transaction data is confirmed and identified, so that a mechanism of subsequent identification can be provided, the data can occupy the linked chain, and the subsequent service requirement is triggered in advance.

Based on the foregoing embodiments, an embodiment of the present application further provides a block chain-based data uplink method, where the method is applied to a block chain node device, and the method includes:

step S111, acquiring first transaction data and second transaction data;

here, the first transaction data and the second transaction data are transaction data that need to be finally linked up, and in this embodiment, the obtaining time points of the first transaction data and the second transaction data are not limited.

Step S112, performing uplink processing on the first transaction data;

step S113, confirming and identifying the second transaction data;

in this embodiment, the execution sequence of step S112 and step S113 is not limited, and the uplink processing on the first transaction data and the confirmation consensus on the second transaction data may be performed simultaneously, so that the efficiency of block chain processing may be improved as a whole; of course, any step may be performed first, for example, the first transaction data is ul processed first, or the second transaction data is confirmed first.

Step S114, performing a confirmation consensus on the first transaction data when the first transaction data is successfully linked and the second transaction data has completed the confirmation consensus.

Here, it is necessary to perform the confirmation and agreement on the second transaction data, and then perform the confirmation and agreement on the first transaction data. In some embodiments, the first transaction data is transaction data that can be subject to post-mortem consensus, and the second transaction data is transaction data that must be re-linked a priori. In some embodiments, the first transaction data is transaction data requiring high real-time performance, and the second transaction data is transaction data requiring low real-time performance.

For example, when a certain block link point device acquires first transaction data and second transaction data at a certain time, the block link point device first sends the second transaction data to a plurality of verification nodes in a block link network for confirmation and consensus, the block link node device links the first transaction data while the plurality of verification nodes confirm and consensus on the second transaction data, and when the first transaction data is successfully linked and the second transaction data is verified, the block link node device sends the first transaction data to the plurality of verification nodes for confirmation and consensus. Therefore, the block chain can concurrently carry out the chain-linking operation of the first transaction data and the second transaction data, and does not need to pack, verify and chain-link the first transaction data first and then pack, verify and chain-link the second transaction data. The data uplink method in the embodiment of the application greatly improves the concurrent processing capacity of the block chain.

Based on the foregoing embodiments, an embodiment of the present application further provides a block chain-based data uplink method, where the method is applied to a block chain node device, and the method includes:

step S121, acquiring first transaction data and second transaction data;

step S122, under the condition that the first transaction data is not confirmed to be common, performing uplink processing on the first transaction data;

here, the confirmation of the transaction data refers to verifying the authenticity and validity of the transaction data.

Step S123, carrying out confirmation and consensus on the second transaction data;

in the embodiment of the present application, the execution sequence of the step S122 and the step S123 is not limited.

Step S124, performing a confirmation consensus on the first transaction data when the first transaction data is successfully linked and the second transaction data has completed the confirmation consensus;

step S125, performing uplink processing on the second transaction data piece under the condition that the second transaction data piece is confirmed to meet the consensus condition; wherein the first transaction data and the second transaction data have different attribute information.

In the embodiment of the present application, the execution sequence of the step S124 and the step S125 is not limited, and the specific implementation may be that two steps are performed simultaneously, or one step is performed before the other step.

Here, the attribute information may include a level of transaction data with respect to timeliness, for example, the first transaction data is transaction data with a high requirement on real-time performance, and the second transaction data is transaction data with a low requirement on real-time performance. The attribute information may also include a type of transaction data, for example, the type of the first transaction data indicates that the first transaction data is transaction data that can be subject to post-event consensus, and the type of the second transaction data indicates that the second transaction data is transaction data that must be certified for re-uplink a priori. Of course, the embodiment of the present application does not limit the specific representation form of the attribute information.

In the embodiment of the present application, the method provided in steps S123 to S125 can greatly improve the concurrent processing capability of the block chain.

Based on the foregoing embodiment, an embodiment of the present application further provides a block chain based data uplink method, fig. 2 is a schematic diagram illustrating an implementation flow of the block chain based data uplink method according to the embodiment of the present application, and as shown in fig. 2, the method is applied to a block chain node device, and the method includes:

step S201, acquiring first transaction data;

step S202, performing uplink processing on the first transaction data;

step S203, controlling the block link point performing uplink processing on the first transaction data to perform mortgage, so that the service related to the first transaction data can be processed when the first transaction data is not confirmed to be common;

here, before the uplink processing is performed on the first transaction data, the first transaction data is not confirmed and identified, that is, the authenticity and the validity of the first transaction data are not verified and the first transaction data is linked, so that it is necessary to control the block link point performing the uplink processing on the first transaction data to perform a mortgage (for example, a certain fee) so as to ensure the normal operation of the subsequent business processing related to the first transaction data.

Step S204, under the condition that the first transaction data is successfully linked, performing confirmation consensus on the first transaction data;

here, after the first transaction data is successfully linked, the first transaction data may be confirmed and identified after waiting for other transaction data to be verified by the plurality of verification nodes, or the first transaction data may be confirmed and identified after other transaction data related to the first transaction data is acquired, which is not limited in the embodiment of the present application.

Step S205, after the mortgage is finished, if the first transaction data is confirmed to meet the consensus condition, returning the mortgage;

step S206, after the mortgage is finished, if the first transaction data is confirmed not to meet the consensus condition, deducting the mortgage.

In the embodiment of the application, if the first transaction data is confirmed to be real and legal transaction data, returning the mortgage to a block chain node for performing uplink processing on the first transaction data; deducting the mortgage if the first transaction data is confirmed to be illegal, non-authentic transaction data.

In some embodiments, the step of uplink processing the first transaction data includes: performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

correspondingly, the step further includes, after the confirming and identifying the first transaction data if the first transaction data is successfully linked, the step of: if the first transaction data is confirmed to satisfy a consensus condition, the first transaction data is moved from the first data area to a second data area of the designated block.

Based on the foregoing embodiment, an embodiment of the present application further provides a block chain-based data uplink method, fig. 3 is a schematic view illustrating a third implementation flow of the block chain-based data uplink method according to the embodiment of the present application, and as shown in fig. 3, the method is applied to a block chain node device, and the method includes:

step S301, acquiring first transaction data;

step S302, performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

in this embodiment, each block of the block chain is divided into two data areas, namely, a first data area and a second data area, where the first data area is a post-event consensus data area, and the second data area is a confirmed data area.

Here, after the first transaction data is linked, since the first transaction data has not been confirmed and agreed, the first transaction data may be stored in a post-consensus data area of a newly created block in the blockchain.

Step S303, under the condition that the first transaction data is successfully linked, performing confirmation consensus on the first transaction data;

step S304, if the first transaction data is confirmed to satisfy the consensus condition, moving the first transaction data from the first data area to a second data area of the designated block.

Here, if the first transaction data is confirmed to satisfy the consensus condition, i.e., verified as valid transaction data, in a subsequent process, the first transaction data is moved from the post-consensus data area to the confirmed data area.

Based on the foregoing embodiments, an embodiment of the present application further provides a block chain-based data uplink method, where the method is applied to a block chain node device, and the method includes:

step S311, acquiring first transaction data;

step S312, performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

step S313, under the condition that the first transaction data is successfully linked, third transaction data is obtained; wherein the third transaction data has an association relationship with the first transaction data;

for example, if the first transaction data is that a borrows B a certain amount of money, the third transaction data may be that B performs an operation with the certain amount of money, or the third transaction data may be that B borrows C the certain amount of money. In the embodiment of the present application, specific content of the association relationship is not limited.

Step S314, performing uplink processing on the third transaction data, and if the first transaction data is not confirmed to be common, storing the third transaction data in a first data area of a designated block;

here, when the uplink processing is performed on the third transaction data, if the first transaction data is not confirmed to be the consensus yet, the third transaction data is stored in the post-consensus data area of the newly opened block in the blockchain.

And step S315, associating the first transaction data with the third transaction data.

Here, the first transaction data may be associated with the third transaction data by noting an identification of the first transaction data in a block corresponding to the third transaction data. Of course, the first transaction data and the third transaction data may also be associated by other methods, which is not limited in the embodiment of the present application.

Step S316, performing a confirmation consensus on the first transaction data under the condition that the uplink of the first transaction data is successful;

step S317, if the first transaction data is confirmed to satisfy the consensus condition, moving the first transaction data from the first data area to a second data area of the designated block.

In some embodiments, the method further comprises:

step S31, if the first transaction data is not confirmed to be the same, determining a predetermined amount of charges according to the associated information of the first transaction data and the third transaction data when the third transaction data is successfully linked;

step S32, controlling the block link point mortgage for the uplink processing of the third transaction data for the predetermined amount of charges.

For example, if the first transaction data is a first node borrowed from B100 dollars a, 50 bit coins are deposited in the first node uplink processing the first transaction data, the third transaction data is a second node borrowed from B150 dollars B, and 100 dollars in the 150 dollars a are deposited from the first node to B, then 60 bit coins in the second node uplink processing the third transaction data can be determined according to the association relationship between the first transaction data and the third transaction data and the number of bit coins deposited from the first node.

Based on the foregoing embodiments, an embodiment of the present application further provides a block chain-based data uplink method, where the method is applied to a block chain node device, and the method includes:

step S321, acquiring first transaction data;

step S322, performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

step S323, under the condition that the first transaction data is successfully linked, acquiring third transaction data; wherein the third transaction data has an association relationship with the first transaction data;

step S324, performing uplink processing on the third transaction data, and if the first transaction data is not confirmed to be common, storing the third transaction data in a first data area of a designated block;

step S325, associating the first transaction data with the third transaction data;

step S326, performing uplink processing on the third transaction data, and if the first transaction data is confirmed to satisfy the consensus condition and the third transaction data does not need to be confirmed and agreed, storing the third transaction data in a second data area of the designated block;

in the embodiment of the present invention, the steps S324 to S325 are different from the step S326 in the way of performing the uplink processing on the third transaction data. In the using process, the actual data may be matched with the conditions in step S324 or step S326, and different processing modes may be selected and executed according to the matching result.

Here, when the uplink processing is performed on the third transaction data, if the first transaction data is confirmed to satisfy the consensus condition at this time and the third transaction data is data that does not need to be verified, the third transaction data is stored in the confirmed data area of the newly opened block in the blockchain.

Step S327, performing a confirmation consensus on the first transaction data when the uplink of the first transaction data is successful;

step S328, if the first transaction data is confirmed to satisfy the consensus condition, moving the first transaction data from the first data area to a second data area of the designated block.

Based on the foregoing embodiments, an embodiment of the present application further provides a block chain-based data uplink method, where the method is applied to a block chain node device, and the method includes:

step S331, acquiring first transaction data;

step S332, performing uplink processing on the first transaction data, and storing the first transaction data in a first data area of a designated block;

step S333, under the condition that the first transaction data is successfully linked, acquiring third transaction data; wherein the third transaction data has an association relationship with the first transaction data;

step S334, performing uplink processing on the third transaction data, and if the first transaction data is not confirmed to be common, storing the third transaction data in a first data area of a designated block;

step S335, associating the first transaction data with the third transaction data;

step S336, performing uplink processing on the third transaction data, and if the first transaction data is confirmed to satisfy the consensus condition and the third transaction data does not need to be confirmed and consensus, storing the third transaction data in a second data area of the designated block;

step S337, performing uplink processing on the third transaction data, and if the first transaction data is confirmed to satisfy a consensus condition and the third transaction data is not confirmed to be consensus, storing the third transaction data in a first data area of a designated block;

in this embodiment, the steps S334 to S335, and the steps S336 and S337 are three different manners of performing the uplink processing on the third transaction data. During the use process, the actual data may be matched with the conditions in step S334, step S336 or step S337, and different processing modes may be selected and executed according to the matching result.

Here, when the uplink processing is performed on the third transaction data, if the first transaction data is confirmed to satisfy the consensus condition, and the third transaction data is data that needs to be verified and is not verified, the third transaction data is stored in the post-consensus data area of the newly opened block in the block chain. Similarly, when the uplink processing is performed on the third transaction data, if the first transaction data is determined to satisfy the consensus condition, the third transaction data is data that needs to be verified, and the third transaction data is verified to be legal, the third transaction data is stored in the confirmed data area of the newly opened block in the blockchain.

Step S338, performing a confirmation consensus on the first transaction data under the condition that the uplink of the first transaction data is successful;

step S339, if the first transaction data is confirmed to satisfy the consensus condition, moving the first transaction data from the first data area to a second data area of the designated block.

Based on the foregoing embodiment, an embodiment of the present application further provides a block chain based data uplink method, and fig. 4 is a fourth schematic flow chart illustrating an implementation process of the block chain based data uplink method according to the embodiment of the present application, where as shown in fig. 4, the method is applied to a block chain node device, and the method includes:

step S401, acquiring first transaction data;

step S402, performing uplink processing on the first transaction data;

step S403, performing a confirmation consensus on the first transaction data under the condition that the uplink of the first transaction data is successful;

here, after the step S403 is completed, the following step S404 or the following step S405 may be selected and executed.

Step S404, if the first transaction data is confirmed not to meet the consensus condition, marking the block where the first transaction data is located to indicate that the first transaction data is invalid;

step S405, if the first transaction data is confirmed not to meet the consensus condition, deleting the block where the first transaction data is located.

In the embodiment of the application, a data uplink method with uplink prior and verification later is provided, and risks brought by the method are avoided and benefits of subsequent participants are guaranteed by controlling uplink nodes to carry out mortgage. Furthermore, if the data which is firstly linked and then verified is verified to be illegal in the subsequent process, namely the confirmation is not passed, the block where the data is located is identified to indicate that the first transaction data is invalid or indicate that the block where the data is located is the block where the illegal data is located. Or, if the confirmation is not passed, the block in the block chain where the data is located may also be deleted, and certainly, the data cannot be deleted based on the characteristics of the current block chain, so that the scheme may be flexibly adjusted in the specific implementation.

At present, the existing consensus of a block chain generally comprises two major stages, namely a newly-added account book determining stage and a distribution stage;

the determination of the newly added ledger is greatly different between the public chain and the alliance chain. The new ledger of the public link is usually provided by a competitive method, i.e. a so-called mining mechanism, and the winning node provides the new ledger, such as PoW (Proof of workload), PoS (Proof of rights and interests), and so on. Federation chains typically employ endorsements (determining ledger validity) and algorithms and mechanisms that submit to a particular node (or nodes), determining newly added ledgers based on time ordering. In the distribution phase, for efficient distribution, a mechanism of P2P (Peer-to-Peer) is generally adopted. Considering that the difference of various algorithms in the distribution stage is small, the common consensus algorithm also refers to the first stage, namely how to determine the stage of adding new accounts.

The performance of the public link is not high because a competition mechanism is adopted, and only one node in a single time slice can generate a new account book. Although the federation chain can generate a new ledger by a plurality of nodes, the bottleneck is often in endorsement and time sequencing links.

Based on this, the present application provides a block chain based data uplink method, that is, a new consensus algorithm and mechanism (referred to as a post-consensus mechanism) are proposed, which can zero-identify a block, thereby improving the concurrency characteristics of a block chain network. Meanwhile, the embodiment of the present application provides a new blockchain system for the mechanism. The blockchain system comprises a blockchain network and a plurality of blockchain node devices accessing the network, wherein any one of the plurality of blockchain node devices can realize the data uplink method in the embodiment of the application.

The post consensus mechanism is mainly realized by the following modes:

(1) the uplink data of the block chain is divided into confirmed transactions (corresponding to the confirmed transaction data area) and transactions to be confirmed (i.e. post consensus transactions, corresponding to the post consensus transaction data area).

Here, the block link point can optionally add post-consensus transaction data to the data to be linked in addition to the conventional confirmation (or endorsement) transaction data. Similarly, in the distribution of uplink data in the blockchain, there is post-consensus transaction data in addition to the confirmed transaction data. Of course, in some cases, the node may only send post-consensus transaction data.

(2) For the post consensus transaction data, when the post consensus transaction data is used subsequently, the node can adopt a certain mechanism according to needs to process the post consensus transaction data.

Mechanism 1: and putting the new associated transaction and the preorder posteriodic consensus transaction into a posteriodic consensus transaction data area together, and noting the module number of the preorder posteriodic consensus transaction.

Here, if the pre-event consensus transaction is still not confirmed when the new associated transaction requires uplink (the pre-event consensus transaction data is not confirmed and then placed in the post-event consensus transaction data area), the new associated transaction is also placed in the post-event consensus transaction data area. The new associated transaction and the pre-prior consensus transaction are not placed at the same time point, and are placed in the post-consensus transaction data areas of different blocks.

Mechanism 2: the new associated transaction and the pre-sequence consensus transaction are put into a confirmed transaction data area together, which mainly aims at the situation that the pre-sequence consensus transaction reaches the consensus condition or meets the consensus condition under the condition of current node confirmation, and the new associated transaction does not need to be confirmed.

Here, if the pre-event consensus transaction is confirmed to reach the consensus condition when the new associated transaction needs to be uplink, the pre-event consensus transaction needs to be moved from the post-consensus transaction data area to the confirmed transaction data area. Meanwhile, if the new associated transaction does not need to be confirmed, the new associated transaction is placed in the confirmed transaction data area. The "put together" means that the confirmed transaction data area is put in, and of course, the new associated transaction and the preorder consensus transaction are not put in at the same time point, but are also put in the confirmed transaction data areas of different blocks.

Mechanism 3: the new associated transaction is placed in the post-consensus transaction data area, and the post-consensus transaction is placed in the confirmed transaction data area, which mainly aims at the situation that the post-consensus transaction of the preamble reaches the consensus condition or meets the consensus condition under the confirmation condition of the current node, but the new associated transaction needs to be confirmed and consensus.

Here, if the pre-event consensus transaction is confirmed to reach the consensus condition when the new associated transaction needs to be uplink, the pre-event consensus transaction needs to be moved from the post-consensus transaction data area to the confirmed transaction data area. Meanwhile, if the new associated transaction needs to be confirmed but is not confirmed whether the new associated transaction is legal or not, the new associated transaction is placed in the post-event consensus transaction data area.

In the embodiment of the application, the post-consensus transaction data does not need to be confirmed by a transaction party in advance or endorsed in the uplink data block, and is listed as possible transaction contents. The post-consensus transaction data is gradually confirmed (or endorsed) in the subsequent data block, and when the consensus condition is satisfied, the post-consensus transaction data can be moved from the post-consensus transaction data area to the confirmed transaction data area (i.e., the normal blockchain data area).

(3) And adding a GAS mechanism to the post consensus transaction data.

Here, a GAS mechanism (GAS is a measure in the space network and is an index designed to quantify the computational power consumption) may be added to the post consensus transaction data. I.e., submitting a node to pre-mortgage a portion of tokens (i.e., tokens) as endorsements, ensuring that the data is executed down. If the subsequent verification transaction is normal, the GAS is returned to the submitting node, otherwise, the GAS is deducted.

Of course, in the GAS mechanism, when the previous-order consensus transaction is still in the data area of the subsequent consensus transaction, the submitting node may be controlled to increase the GAS or decrease the GAS in the subsequent new association transaction.

In the embodiment of the application, with the mechanism, a lot of data with high real-time requirements can be preemptively linked without obtaining confirmation or endorsement, so that after the data is rapidly linked, the follow-up service requirements can be triggered in advance. Of course, there may be some risk to subsequent operations on the unconfirmed transaction (if the transaction is not real or illegal), so that the benefit of subsequent participants can be assured by means of a pre-mortgage fee (currency for circulation in the blockchain).

Based on the foregoing embodiments, an embodiment of the present application provides a data uplink apparatus based on a block chain, where the apparatus includes each included unit and each sub-unit included in each unit, and the apparatus can be implemented by a processor in a node device of the block chain; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, the processor may be a CPU (Central Processing Unit), an MPU (Microprocessor Unit), a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), or the like.

Fig. 5 is a schematic structural diagram of a block chain-based data uplink apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus 500 includes:

a first obtaining unit 501, configured to obtain first transaction data;

a first uplink unit 502, configured to perform uplink processing on the first transaction data;

a first consensus unit 503, configured to perform a confirmation consensus on the first transaction data if the first transaction data is successfully uplink.

In some embodiments, the apparatus further comprises:

a second acquisition unit for acquiring second transaction data;

the second consensus unit is used for carrying out confirmation consensus on the second transaction data;

correspondingly, the first common identifying unit 503 includes:

the first consensus unit is used for performing the confirmation consensus on the first transaction data under the condition that the first transaction data is successfully linked and the second transaction data completes the confirmation consensus.

In some embodiments, the apparatus further comprises:

a second uplink unit, configured to perform uplink processing on the second transaction data piece if the second transaction data is determined to satisfy a consensus condition;

wherein the first transaction data and the second transaction data have different attribute information.

In some embodiments, the apparatus further comprises:

a mortgage unit, configured to control mortgage on a block link point that performs uplink processing on the first transaction data, so that a service related to the first transaction data can be processed when the first transaction data is not confirmed to be known;

the refund unit is used for refunding the mortgage after the mortgage is finished and if the first transaction data is confirmed to meet the consensus condition;

and the deduction unit is used for deducting the mortgage if the first transaction data is confirmed not to meet the consensus condition after the mortgage is finished.

In some embodiments, the first uplink unit 502 includes:

the first uplink subunit is used for performing uplink processing on the first transaction data and storing the first transaction data in a first data area of a designated block;

correspondingly, the device further comprises:

and the mobile unit is used for moving the first transaction data from the first data area to a second data area of the designated block if the first transaction data is confirmed to meet a consensus condition.

In some embodiments, the apparatus further comprises:

a third obtaining unit, configured to obtain third transaction data when the first transaction data is successfully linked; wherein the third transaction data has an association relationship with the first transaction data;

a third uplink unit, configured to perform uplink processing on the third transaction data, and store the third transaction data in a first data area of a designated block if the first transaction data is not confirmed to be common;

an association unit for associating the first transaction data with the third transaction data.

In some embodiments, the third uplink unit is further configured to perform uplink processing on the third transaction data, and store the third transaction data in the second data area of the designated block if the first transaction data is confirmed to satisfy the consensus condition and the third transaction data does not need to be confirmed to be consensus.

In some embodiments, the third uplink unit is further configured to perform uplink processing on the third transaction data, and store the third transaction data in the first data area of the designated block if the first transaction data is confirmed to satisfy the consensus condition and the third transaction data is not confirmed to be consensus.

In some embodiments, the apparatus further comprises:

and the marking unit is used for marking the block where the first transaction data is located to indicate that the first transaction data is invalid if the first transaction data is confirmed not to meet the consensus condition.

The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.

It should be noted that, in the embodiment of the present application, if the above block chain based data uplink method is implemented in the form of a software functional module and is sold or used as a standalone product, it may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing an electronic device (which may be a personal computer, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a ROM (Read Only Memory), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.

Correspondingly, the present application provides a block link point device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor executes the program to implement the steps in the block chain based data uplink method provided in the foregoing embodiments.

Accordingly, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps in the block chain based data uplink method.

Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.

It should be noted that fig. 6 is a schematic diagram of a hardware entity of a block-link point apparatus according to an embodiment of the present invention, and as shown in fig. 6, the hardware entity of the block-link point apparatus 600 includes: a processor 601, a communication interface 602, and a memory 603, wherein

The processor 601 generally controls the overall operation of the blockchain node apparatus 600.

The communication interface 602 may enable the blockchain node device 600 to communicate with other blockchain node devices or servers over a network.

The Memory 603 is configured to store instructions and applications executable by the processor 601, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the processor 601 and the block-link node device 600, and may be implemented by FLASH Memory or RAM (Random Access Memory).

In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.

The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.

Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.

The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.

The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:内积论证构造方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!