CN114090682A - Multi-channel alliance link chaining method, device, equipment and storage medium - Google Patents

Multi-channel alliance link chaining method, device, equipment and storage medium Download PDF

Info

Publication number
CN114090682A
CN114090682A CN202111257524.5A CN202111257524A CN114090682A CN 114090682 A CN114090682 A CN 114090682A CN 202111257524 A CN202111257524 A CN 202111257524A CN 114090682 A CN114090682 A CN 114090682A
Authority
CN
China
Prior art keywords
endorsement
node
chain
chain code
channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111257524.5A
Other languages
Chinese (zh)
Inventor
李宗金
张健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Runlian Software System Shenzhen Co Ltd
Original Assignee
Runlian Software System Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Runlian Software System Shenzhen Co Ltd filed Critical Runlian Software System Shenzhen Co Ltd
Priority to CN202111257524.5A priority Critical patent/CN114090682A/en
Publication of CN114090682A publication Critical patent/CN114090682A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • G06F21/53Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow by executing in a restricted environment, e.g. sandbox or secure virtual machine
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The application relates to a block chain technology, and discloses a multi-channel alliance chain chaining method, device, equipment and storage medium, wherein the method comprises the following steps: receiving a transaction proposal; respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so that each endorsement node performs simulation execution by using a chain code to obtain an execution result, and performing endorsement on the execution result to obtain endorsement contents, wherein the channels and the endorsement nodes are in one-to-one correspondence; receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the endorsement node in the simulation execution, and checking the hash value corresponding to the chain code used by the endorsement node in the simulation execution; when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking; and when the verification fails, an error is reported. The method and the device improve the throughput and the processing efficiency of block chain processing.

Description

Multi-channel alliance link chaining method, device, equipment and storage medium
Technical Field
The present application relates to the field of block chains, and in particular, to a method, an apparatus, a device, and a storage medium for multi-channel alliance chain chaining.
Background
Currently, a blockchain network is basically composed of "1 channel +1 account + N members". Each channel has an independent ledger, independent transaction processing and synchronization, and different channels are isolated from each other. The current transaction flow for each chain is: when a transaction proposal is sent, all endorsement nodes are required to execute one time and carry out endorsement returning sdk, and the endorsement nodes are sent to the oder nodes for sorting after verification. When the transaction throughput is not required in a scene, the single-channel mode of the alliance chain can well complete tasks, but the transaction throughput is huge, the efficiency problem of the single channel and part of the complexity of the transaction process are exposed, and the performance and the throughput of the alliance chain are greatly influenced. Therefore, how to solve the problem of low throughput when the existing alliance chain processes transaction proposals becomes a problem to be solved urgently.
Disclosure of Invention
The application provides a multichannel alliance chain chaining method, device, equipment and storage medium, and aims to solve the problem that throughput is low when an alliance chain processes a transaction proposal in the prior art.
In order to solve the above problem, the present application provides a multi-channel alliance chain chaining method, including:
receiving a transaction proposal;
respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so as to enable each endorsement node to use a chain code to perform simulation execution to obtain an execution result, and performing endorsement on the execution result to obtain endorsement content, wherein the channels and the endorsement nodes are in one-to-one correspondence;
receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the simulation execution sent by each endorsement node, and checking the hash value corresponding to the chain code used by the endorsement node during the simulation execution;
when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking;
and when the verification fails, an error is reported.
Further, before the receiving the transaction proposal, the method further comprises:
receiving the chain code and a hash value corresponding to the chain code;
and sending the chain code and the hash value corresponding to the chain code to each endorsement node, and storing the corresponding relation between each endorsement node and the chain code and the hash value corresponding to the chain code so that each endorsement node installs the chain code and the hash value corresponding to the chain code.
Further, the sending the plurality of transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution policy respectively includes:
and according to the sequence of receiving the transaction proposals, sequentially sending the transaction proposals to endorsement nodes in each channel, and executing different transaction proposals by each endorsement node.
Further, before each of the endorsement nodes performs simulation execution using a chain code to obtain an execution result, the method further includes:
and the client instructs the endorsement node to verify the transaction proposal, wherein the verification mode comprises format verification, repeatability verification and signature verification.
Further, the sending the transaction proposal, the execution result and the endorsement content to a sequencing node to complete the uplink comprises:
and the sequencing node sequences each transaction proposal, execution result and endorsement content, generates blocks from each sequenced transaction proposal, execution result and endorsement content, and sends the blocks to anchor nodes in each channel to complete uplink.
Further, the sending the block to an anchor node in each channel to complete uplink includes:
and each anchor node broadcasts in the channel to which the anchor node belongs, so that the accounting node in the channel updates the stored account book based on the broadcasting to finish the uplink.
In order to solve the above problem, the present application further provides a multi-channel alliance-chain apparatus, comprising:
a receiving module for receiving a transaction proposal;
the sending module is used for respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so that each endorsement node performs simulation execution by using a chain code to obtain an execution result, and performs endorsement on the execution result to obtain endorsement contents, wherein the channels and the endorsement nodes are in one-to-one correspondence;
the verification module is used for receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the simulation execution sent by each endorsement node and verifying the hash value corresponding to the chain code used by the endorsement node during the simulation execution;
and the processing module is used for sending the transaction proposal, the execution result and the endorsement content to the sequencing node to complete the chain linking when the verification is passed, and reporting an error when the verification is not passed.
Further, the apparatus further comprises:
the chain code receiving module is used for receiving the chain code and the hash value corresponding to the chain code;
and the deployment module is used for sending the chain codes and the hash values corresponding to the chain codes to the endorsement nodes and storing the corresponding relations between the endorsement nodes and the chain codes and the hash values corresponding to the chain codes so that the chain codes and the hash values corresponding to the chain codes are installed on the endorsement nodes.
In order to solve the above problem, the present application also provides a computer device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a multi-channel alliance-link uplink method as described above.
To solve the above problem, the present application also provides a non-transitory computer-readable storage medium having stored thereon computer-readable instructions that, when executed by a processor, implement the multi-channel alliance-link uplink method as described above.
Compared with the prior art, the multichannel alliance link uplink method, the multichannel alliance link uplink device, the multichannel alliance link uplink equipment and the storage medium provided by the embodiment of the application have at least the following beneficial effects:
receiving initiated transaction proposals through a client, respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so that each endorsement node performs simulated execution by using a chain code to obtain an execution result, and performing endorsement on the execution result by the endorsement nodes to obtain endorsement contents, wherein the channels and the endorsement nodes are in one-to-one correspondence, different transaction proposals are executed by different endorsement nodes, so that the processing throughput and the processing efficiency are improved, the execution results, the endorsement contents and hash values corresponding to the chain codes used for the simulated execution, which are sent by the endorsement nodes, are received, the hash values corresponding to the chain codes used for the simulated execution are checked, and the invariability of the chain codes used for the simulated execution is ensured by checking the hash values, so that the accuracy and the credibility of the execution results are improved, when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking; when the check fails, an error is reported, so that the throughput and the processing efficiency of block chain processing are improved.
Drawings
In order to more clearly illustrate the solution of the present application, a brief description will be given below of the drawings required for describing the embodiments of the present application, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without inventive effort.
Fig. 1 is a flowchart illustrating an overall method for uplink in a multi-channel alliance link according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a multi-channel uplink method in a alliance link according to an embodiment of the present application;
fig. 3 is a block diagram of a multi-channel uplink alliance link apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. One skilled in the art will explicitly or implicitly appreciate that the embodiments described herein can be combined with other embodiments.
The ledger is a general term for a blockchain (also referred to as ledger data) and a state database synchronized with the blockchain. Wherein, the blockchain records the transaction in the form of a file in a file system; the state database records the transactions in the blockchain in the form of different types of Key (Key) Value pairs for supporting fast query of the transactions in the blockchain.
The chain code, a program deployed in a node of the block chain network, carries business logic for executing transactions, and runs in an isolated running environment.
The channel and the private isolation environment provided for the nodes of the members in the organization in the block chain network, the chain codes and the account book in the channel are only visible for the nodes of the members joining the channel, the same node can join a plurality of channels, and one account book is maintained corresponding to each channel.
An endorsement node, a node that undertakes an endorsement task in a blockchain network, may be referred to as an endorsement node. Wherein the endorsement node can prove its legitimacy by a valid signature of the expected information of the valid certificate.
The sequencing node sequences the received transactions according to the principle of FIFS (First In First served), but the sequence of the transactions In the block is not necessarily the same as the actual sequence, but is determined by the time of arriving at the sequencing node. The sequenced transactions are packed into blocks according to a certain rule, and the sequencing node sends the blocks to other nodes (anchor nodes) or clients; and ensuring that the blocks distributed by all the sorting nodes are consistent.
A federation chain, also called a federation blockchain, is a form in a blockchain network; only for members of a specific group and limited third parties, a plurality of preselected nodes are internally designated as billers, and the generation of each block is jointly determined by all the preselected nodes.
The application provides a multi-channel alliance chain uplink method. Referring to fig. 1 and fig. 2, fig. 1 is a schematic flowchart of a multi-channel uplink method in a alliance chain according to an embodiment of the present disclosure, and fig. 2 is an overall flowchart according to an embodiment of the present disclosure.
In this embodiment, the multi-channel alliance link uplink method includes:
s1, receiving a transaction proposal;
specifically, a corresponding transaction proposal is generated according to a request triggered by a specific front-end service.
Further, before the receiving the transaction proposal, the method further comprises:
receiving the chain code and a hash value corresponding to the chain code;
and sending the chain code and the hash value corresponding to the chain code to each endorsement node, and storing the corresponding relation between each endorsement node and the chain code and the hash value corresponding to the chain code so that each endorsement node installs the chain code and the hash value corresponding to the chain code.
Specifically, before the block chain is formally utilized for processing, the chain codes in the endorsement nodes and the hash values corresponding to the chain codes need to be uploaded or updated so as to maintain the newer chain codes; firstly, the chain code and the hash value corresponding to the chain code are received through the client, then the chain code and the hash value corresponding to the chain code are sent to each endorsement node through the client, and each endorsement node is provided with the chain code and the hash value corresponding to the chain code. And storing the corresponding relation between the endorsement node and the chain code and the hash value corresponding to the chain code, wherein when the chain code is sent to change, the corresponding hash value will change, and the changed chain code will not pass the corresponding verification based on the corresponding relation after the client side verifies.
The adjustment of the calculation steps of the transaction proposal is realized by maintaining the chain code and the hash value corresponding to the chain code, and the chain code can be found when being tampered, thereby ensuring the uniqueness of the calculation steps.
S2, respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy, so that each endorsement node performs simulation execution by using a chain code to obtain an execution result, and performs endorsement on the execution result to obtain endorsement content, wherein the channels and the endorsement nodes are in one-to-one correspondence;
specifically, according to a preset distribution strategy and the sequence of receiving a plurality of transaction proposals, the transaction proposals are sequentially sent to endorsement nodes in a plurality of channels respectively, and each endorsement node executes different transaction proposals.
Further, the sending the plurality of transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution policy respectively includes:
and according to the sequence of receiving the transaction proposals, sequentially sending the transaction proposals to endorsement nodes in each channel, and executing different transaction proposals by each endorsement node.
Specifically, in this embodiment, the distribution policy may be that, according to the order of receiving a plurality of transaction proposals, the transaction proposals are sequentially sent to endorsement nodes in the channel 1, the channel 2, and the channel 3 as shown in fig. 2, so that the endorsement nodes in each channel process different transaction proposals.
The transaction proposals are distributed according to the receiving sequence of the transaction proposals, and different transaction proposals are executed by each endorsement node, so that the situation of high throughput can be dealt with, and the processing efficiency is improved.
In other embodiments of the present application, the distribution policy may also be allocated based on idle conditions of the endorsement node.
Further, before each of the endorsement nodes performs simulation execution using a chain code to obtain an execution result, the method further includes:
and the client instructs the endorsement node to verify the transaction proposal, wherein the verification mode comprises format verification, repeatability verification and signature verification.
Specifically, after the client sends the transaction proposal to the endorsement node in the channel, the client further indicates the endorsement node to verify the transaction proposal, and the verification modes comprise format verification, repeatability verification and signature verification.
The format verification, namely a regular matching mode, verifies whether the format of the transaction proposal meets the specification;
the repeatability verification is to judge whether the current transaction proposal is a processed previous transaction proposal or not;
the signature verification is to verify the digital signature of the client;
by adopting three verification modes of format verification, repeatability verification and signature verification, the processing tightness is improved.
S3, receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the simulation execution sent by each endorsement node, and checking the hash value corresponding to the chain code used by the endorsement node during the simulation execution;
specifically, the hash value corresponding to the chain code used during the endorsement node simulation is checked to ensure that the endorsement node is accurate in the calculation process of the transaction proposal. And comparing the hash value sent by the endorsement node with the hash value corresponding to the chain code used on the endorsement node stored on the client to verify the hash value corresponding to the chain code.
S4, when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the uplink;
further, the sending the transaction proposal, the execution result and the endorsement content to a sequencing node to complete the uplink comprises:
and the sequencing node sequences each transaction proposal, execution result and endorsement content, generates blocks from each sequenced transaction proposal, execution result and endorsement content, and sends the blocks to anchor nodes in each channel to complete uplink.
Specifically, the sequencing node sequences the transaction proposals, the execution results and the endorsement contents according to the sequence of receiving the transaction proposals, the execution results and the endorsement contents, generates blocks of the sequenced transaction proposals, execution results and endorsement contents, and sends the blocks to the anchor nodes in the channels to complete uplink.
And the transaction proposal is sent to a sequencing node for sequencing, a block is generated and then sent to anchor nodes in different channels to complete the chain linking, and the block is stored.
Still further, the sending the block to an anchor node in each of the channels to complete uplink includes:
and each anchor node broadcasts in the channel to which the anchor node belongs, so that the accounting node in the channel updates the stored account book based on the broadcasting to finish the uplink.
Specifically, each anchor node broadcasts in the channel to which the anchor node belongs, the broadcast content includes the block generated by the sequencing node, and each accounting node updates the stored account book according to the block in the broadcast information, thereby completing the uplink.
And through the broadcast of the anchor node, the accounting node updates the stored account book according to the block in the broadcast information, and the uplink, namely the storage, of the block is realized.
And S5, if the verification fails, an error is reported.
Specifically, when the client fails to check, an error message is sent to the front end to prompt that the corresponding chain code of the endorsement node is tampered or replaced.
As shown in fig. 2, which shows the overall process of the present application, a client generates a corresponding transaction proposal according to a request triggered by a specific service, sequentially sends the transaction proposals to endorsement nodes in a channel 1, a channel 2 and a channel 3 according to the sequence of a plurality of transaction proposals, so that the endorsement nodes perform simulated execution on the transaction proposals to obtain an execution result, performs endorsement on the endorsement nodes by comparing the execution result with the endorsement node to obtain endorsement content, then the client receives the execution result and the endorsement content sent by the endorsement nodes and hash values corresponding to chain codes used in simulated execution, performs comparison and verification on the client according to the stored correspondence and hash values corresponding to the chain codes sent by the endorsement nodes, if the verification passes, sends the transaction proposals, the execution results and the endorsement content to a sequencing node for sequencing and generating blocks, and sends the blocks to anchor nodes in each channel, the anchor node broadcasts in the channel thereof, so that the accounting node updates the stored account book according to the block in the broadcast, thereby completing the uplink.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The multichannel alliance link chaining method of the embodiment receives initiated transaction proposals through a client, respectively sends the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy, so that each endorsement node performs simulated execution by using a link code to obtain an execution result, the endorsement nodes also perform endorsement on the execution result to obtain endorsement contents, the channels and the endorsement nodes are in one-to-one correspondence, different transaction proposals are executed through different endorsement nodes, the processing throughput and the processing efficiency are improved, hash values corresponding to the execution results, the endorsement contents and the link codes used for the simulated execution sent by each endorsement node are received, the hash values corresponding to the link codes used for the simulated execution of the endorsement nodes are checked, and the invariability of the link codes used for the simulated execution is ensured by checking the hash values, the accuracy and the credibility of the execution result are improved, and when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking; when the check fails, an error is reported, so that the processing throughput and the processing efficiency are improved.
The present embodiment further provides a multi-channel uplink device in alliance chain, as shown in fig. 3, which is a functional block diagram of the multi-channel uplink device in alliance chain according to the present application.
The multi-channel alliance-link uplink device 100 can be installed in an electronic device. According to the implemented functions, the multi-channel alliance uplink device 100 may comprise a receiving module 101, a sending module 102, a checking module 103 and a processing module 104. A module, which may also be referred to as a unit in this application, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
a receiving module 101, configured to receive a transaction proposal;
specifically, the receiving module 101 generates a corresponding transaction proposal according to a request triggered by a front-end specific service.
Further, the multi-channel alliance-link uplink device 100 further comprises a chain code receiving module and a deployment module;
the chain code receiving module is used for receiving the chain code and the hash value corresponding to the chain code;
the deployment module is configured to send the chain code and the hash value corresponding to the chain code to each endorsement node, and store a corresponding relationship between each endorsement node and the chain code and the hash value corresponding to the chain code, so that each endorsement node installs the chain code and the hash value corresponding to the chain code.
Specifically, the chain code receiving module receives the chain code and the hash value corresponding to the chain code, and then the deployment module sends the chain code and the hash value corresponding to the chain code to each endorsement node, and each endorsement node installs the chain code and the hash value corresponding to the chain code. And storing the corresponding relation between the endorsement node and the chain code and the hash value corresponding to the chain code, wherein when the chain code is sent to change, the corresponding hash value will change, and the changed chain code will not pass the verification based on the corresponding relation after the client side verifies.
The chain code and the corresponding hash value are maintained through the matching of the chain code receiving module and the deployment module, so that the adjustment of the calculation step of the transaction proposal is realized, and the chain code can be found when being tampered, thereby ensuring the uniqueness of the calculation step.
A sending module 102, configured to send the multiple transaction proposals to endorsement nodes in multiple channels according to a preset distribution policy, so that each endorsement node performs simulated execution using a chain code to obtain an execution result, and performs endorsement on the execution result to obtain endorsement content, where the channels and the endorsement nodes are in a one-to-one correspondence relationship;
specifically, the sending module 102 sequentially sends the plurality of transaction proposals to endorsement nodes in a plurality of channels respectively according to a preset distribution policy and the sequence of receiving the plurality of transaction proposals, and each endorsement node executes different transaction proposals.
Further, the sending module 102 includes a distribution submodule;
the distribution submodule is used for sequentially sending the transaction proposals to endorsement nodes in each channel according to the sequence of receiving the transaction proposals, and each endorsement node executes different transaction proposals.
Specifically, the distribution sub-module may sequentially send the transaction proposal to endorsement nodes in the channel 1, the channel 2, and the channel 3 as shown in fig. 2 according to the distribution policy and the sequence of receiving a plurality of transaction proposals, so as to implement that the endorsement nodes in each channel process different transaction proposals.
The distribution submodule is distributed according to the receiving sequence of the transaction proposals, and each endorsement node executes different transaction proposals, so that the situation of high throughput can be dealt with, and the processing efficiency is improved.
Further, the multi-channel uplink alliance device 100 further comprises an indication checking module;
the indication checking module is used for indicating the endorsement node to verify the transaction proposal by the client, and the verification mode comprises format verification, repeatability verification and signature verification.
Specifically, after the transaction proposal is sent to the endorsement node in the channel, the indication and verification module further indicates the endorsement node to verify the transaction proposal, and the verification modes include format verification, repeatability verification and signature verification.
The format verification, namely a regular matching mode, verifies whether the format of the transaction proposal meets the specification;
the repeatability verification is to judge whether the current transaction proposal is a processed previous transaction proposal or not;
the signature verification is to verify the digital signature of the client;
the indication checking module improves the processing tightness by adopting three verification modes of format verification, repeatability verification and signature verification.
A checking module 103, configured to receive the execution result, the endorsement content, and a hash value corresponding to a chain code used in the simulation execution sent by each endorsement node, and check the hash value corresponding to the chain code used in the simulation execution of the endorsement node;
specifically, the verification module 103 verifies the hash value corresponding to the chain code used during the endorsement node simulation to ensure that the endorsement node is accurate in the calculation process of the transaction proposal. And comparing the hash value sent by the endorsement node with the hash value corresponding to the chain code used on the endorsement node stored on the client to verify the hash value corresponding to the chain code.
The processing module 104 is configured to send the transaction proposal, the execution result, and the endorsement content to the sequencing node to complete uplink when the verification passes, and report an error when the verification fails.
Further, the processing module comprises an uplink module;
and the uplink sub-module is used for sequencing each transaction proposal, execution result and endorsement content by the sequencing node, generating blocks by each sequenced transaction proposal, execution result and endorsement content, and sending the blocks to the anchor nodes in each channel to complete uplink.
Specifically, the uplink sub-module sorts the transaction proposals, the execution results and the endorsement contents by using a sorting node according to the sequence of receiving the transaction proposals, the execution results and the endorsement contents, generates blocks from the sorted transaction proposals, execution results and endorsement contents, and sends the blocks to the anchor nodes in the channels to complete uplink.
And the uplink sub-module transmits the transaction proposal to a sequencing node for sequencing, generates a block and then transmits the block to anchor nodes in different channels to complete uplink, so that the block is stored.
Still further, the uplink sub-module further includes a broadcasting unit;
and the broadcasting unit is used for broadcasting in the channel to which each anchor node belongs so that the accounting node in the channel updates the stored account book based on the broadcasting to complete uplink.
Specifically, the broadcast unit broadcasts in the channel to which the anchor node belongs by using each anchor node, the broadcast content includes the block generated by the sequencing node, and each accounting node updates the stored account book according to the block in the broadcast information, thereby completing the uplink.
And the broadcasting unit enables the accounting node to update the stored account book according to the block in the broadcast information through the broadcasting of the anchor node, so as to realize the uplink, namely the storage, of the block.
By adopting the device, the multichannel alliance link device 100 receives an initiated transaction proposal through the cooperation of the receiving module 101, the sending module 102, the checking module 103 and the processing module 104, the client side sends the transaction proposals to endorsement nodes in a plurality of channels respectively according to a preset distribution strategy so that each endorsement node performs simulation execution by using a link code to obtain an execution result, the endorsement nodes also perform endorsement on the execution result to obtain endorsement contents, the channels and the endorsement nodes are in one-to-one correspondence, different transaction proposals are executed through different endorsement nodes, the processing throughput and the processing efficiency are improved, the execution result, the endorsement contents and hash values corresponding to the link codes used in simulation execution sent by each endorsement node are received, and the hash values corresponding to the link codes used in simulation execution of the endorsement nodes are checked, the invariance of chain codes used for simulation execution is ensured by checking the hash value, the accuracy and the credibility of an execution result are improved, and when the check is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete chaining; when the check fails, an error is reported, so that the processing throughput and the processing efficiency are improved.
The embodiment of the application also provides computer equipment. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the computer device 4. Of course, the memory 41 may also include both internal and external storage devices of the computer device 4. In this embodiment, the memory 41 is generally used for storing the operating system and various types of application software installed on the computer device 4, such as computer readable instructions of the multi-channel alliance link uplink method. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, such as computer readable instructions for executing the multi-channel uplink alliance method.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
In this embodiment, when the processor executes the computer readable instructions stored in the memory, the steps of the multi-channel alliance link chaining method as in the above embodiments are implemented, where a client receives an initiated transaction proposal, and sends the transaction proposals to endorsement nodes in multiple channels according to a preset distribution policy, so that each endorsement node performs simulated execution using a link code to obtain an execution result, the endorsement nodes further performs endorsement on the execution result to obtain endorsement contents, the channels and the endorsement nodes have a one-to-one correspondence relationship, different endorsement nodes execute different transaction proposals, so as to improve processing throughput and processing efficiency, receive the execution result, the endorsement contents and hash values corresponding to the link codes used in the simulated execution sent by each endorsement node, and check the hash values corresponding to the link codes used in the simulated execution of the endorsement nodes, the invariance of chain codes used for simulation execution is ensured by checking the hash value, the accuracy and the credibility of an execution result are improved, and when the check is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete chaining; when the check fails, an error is reported, so that the processing throughput and the processing efficiency are improved.
An embodiment of the present application further provides a computer-readable storage medium, where the computer-readable instructions are stored in the computer-readable storage medium and can be executed by at least one processor, so that the at least one processor executes the steps of the multi-channel alliance-link chaining method, and receives an initiated transaction proposal through a client, and sends the transaction proposal to endorsement nodes in multiple channels according to a preset distribution policy, so that each endorsement node performs simulation execution using a link code to obtain an execution result, and further performs endorsement on the execution result to obtain endorsement content, where the channels and the endorsement nodes are in a one-to-one correspondence relationship, and executes different transaction proposals through different endorsement nodes, so as to improve throughput and processing efficiency of processing, and receive the execution result sent by each endorsement node, The endorsement content and the hash value corresponding to the chain code used by the simulation execution verify the hash value corresponding to the chain code used by the endorsement node during the simulation execution, the invariance of the chain code used by the simulation execution is ensured by verifying the hash value, the accuracy and the credibility of the execution result are improved, and when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking; when the check fails, an error is reported, so that the processing throughput and the processing efficiency are improved.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
The multi-channel alliance-link uplink apparatus, the computer device and the computer readable storage medium according to the above embodiments of the present application have the same technical effects as the multi-channel alliance-link uplink method according to the above embodiments, and are not expanded herein.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A multi-channel alliance-link uplink method, wherein the method comprises:
receiving a transaction proposal;
respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so as to enable each endorsement node to use a chain code to perform simulation execution to obtain an execution result, and performing endorsement on the execution result to obtain endorsement content, wherein the channels and the endorsement nodes are in one-to-one correspondence;
receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the simulation execution sent by each endorsement node, and checking the hash value corresponding to the chain code used by the endorsement node during the simulation execution;
when the verification is passed, the transaction proposal, the execution result and the endorsement content are sent to a sequencing node to complete the chain linking;
and when the verification fails, an error is reported.
2. The multi-channel alliance-link method as claimed in claim 1, further comprising, prior to said receiving a transaction proposal:
receiving the chain code and a hash value corresponding to the chain code;
and sending the chain code and the hash value corresponding to the chain code to each endorsement node, and storing the corresponding relation between each endorsement node and the chain code and the hash value corresponding to the chain code so that each endorsement node installs the chain code and the hash value corresponding to the chain code.
3. The multi-channel alliance-link uplink method as claimed in claim 1, wherein the sending the plurality of transaction proposals to endorsement nodes in a plurality of channels respectively according to a preset distribution strategy comprises:
and according to the sequence of receiving the transaction proposals, sequentially sending the transaction proposals to endorsement nodes in each channel, and executing different transaction proposals by each endorsement node.
4. The method of claim 1, wherein before each endorsement node performs the simulation using the chain code to obtain the execution result, the method further comprises:
and the client instructs the endorsement node to verify the transaction proposal, wherein the verification mode comprises format verification, repeatability verification and signature verification.
5. The multi-channel alliance-link uplink method of claim 1 wherein sending the transaction proposal, execution result and endorsement content to a sequencing node to complete uplink comprises:
and the sequencing node sequences each transaction proposal, execution result and endorsement content, generates blocks from each sequenced transaction proposal, execution result and endorsement content, and sends the blocks to anchor nodes in each channel to complete uplink.
6. The multi-channel alliance-link uplink method as claimed in claim 5, wherein the sending the block to an anchor node in each of the channels to complete uplink comprises:
and each anchor node broadcasts in the channel to which the anchor node belongs, so that the accounting node in the channel updates the stored account book based on the broadcasting to finish the uplink.
7. A multi-channel alliance-link apparatus, the apparatus comprising:
a receiving module for receiving a transaction proposal;
the sending module is used for respectively sending the transaction proposals to endorsement nodes in a plurality of channels according to a preset distribution strategy so that each endorsement node performs simulation execution by using a chain code to obtain an execution result, and performs endorsement on the execution result to obtain endorsement contents, wherein the channels and the endorsement nodes are in one-to-one correspondence;
the verification module is used for receiving the execution result, the endorsement content and the hash value corresponding to the chain code used by the simulation execution sent by each endorsement node and verifying the hash value corresponding to the chain code used by the endorsement node during the simulation execution;
and the processing module is used for sending the transaction proposal, the execution result and the endorsement content to the sequencing node to complete the chain linking when the verification is passed, and reporting an error when the verification is not passed.
8. The multi-channel alliance-link apparatus as claimed in claim 7, wherein the apparatus further comprises:
the chain code receiving module is used for receiving the chain code and the hash value corresponding to the chain code;
and the deployment module is used for sending the chain codes and the hash values corresponding to the chain codes to the endorsement nodes and storing the corresponding relations between the endorsement nodes and the chain codes and the hash values corresponding to the chain codes so that the chain codes and the hash values corresponding to the chain codes are installed on the endorsement nodes.
9. A computer device, characterized in that the computer device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores computer readable instructions that when executed by the processor implement the multi-channel alliance-link uplink method of any of claims 1 to 6.
10. A computer-readable storage medium having computer-readable instructions stored thereon which, when executed by a processor, implement the multi-channel alliance-link method of any of claims 1 to 6.
CN202111257524.5A 2021-10-27 2021-10-27 Multi-channel alliance link chaining method, device, equipment and storage medium Pending CN114090682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111257524.5A CN114090682A (en) 2021-10-27 2021-10-27 Multi-channel alliance link chaining method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111257524.5A CN114090682A (en) 2021-10-27 2021-10-27 Multi-channel alliance link chaining method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114090682A true CN114090682A (en) 2022-02-25

Family

ID=80297926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111257524.5A Pending CN114090682A (en) 2021-10-27 2021-10-27 Multi-channel alliance link chaining method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114090682A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033645A (en) * 2022-07-06 2022-09-09 贵州电网有限责任公司 Electric power data storage method and system based on block chain technology

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115033645A (en) * 2022-07-06 2022-09-09 贵州电网有限责任公司 Electric power data storage method and system based on block chain technology
CN115033645B (en) * 2022-07-06 2023-11-21 贵州电网有限责任公司 Power data storage method and system based on block chain technology

Similar Documents

Publication Publication Date Title
CN110300172B (en) Block chain data consensus method and related equipment
CN110288479B (en) Method and related equipment for consensus of block chain data
CN110958118B (en) Certificate authentication management method, device, equipment and computer readable storage medium
CN109257334B (en) Block chain-based data uplink system, method and storage medium
CN111163182B (en) Block chain-based device registration method and apparatus, electronic device, and storage medium
CN108769230B (en) Transaction data storage method, device, server and storage medium
CN112188493B (en) Authentication method, system and related equipment
CN109981279B (en) Block chain system, communication method, device, equipment and medium
CN110362357A (en) A kind of configuration file management method and device of application program
CN110570196A (en) Transaction data processing method and device, terminal equipment and storage medium
CN104504347A (en) Data consistency matching processing method and device
CN112311779B (en) Data access control method and device applied to block chain system
CN115225639B (en) Changing method and device for consensus trusted cluster, computer equipment and medium
CN111008206A (en) Method and device for storing state data of cross-chain transaction and storage medium
CN114221972A (en) Relay blockchain system and cross-chain transaction method
CN112398949A (en) Transaction confirmation method, system, device and computer equipment
CN114090682A (en) Multi-channel alliance link chaining method, device, equipment and storage medium
CN110990790A (en) Data processing method and equipment
CN112037055B (en) Transaction processing method, device, electronic equipment and readable storage medium
CN107318100B (en) Method, device and system for binding mobile phone number
CN113255011A (en) Block chain state mapping method, system, computer device and storage medium
CN114710297B (en) Block chain evidence storing method, device and equipment based on aggregated signature and storage medium
CN112037062B (en) Transaction consensus method, device, electronic equipment and readable storage medium
CN114820179A (en) Block chain signature checking method and related equipment
CN113986578A (en) Message checking method and first equipment

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