CN112633885A - Multi-signature transaction implementation method and related device - Google Patents
Multi-signature transaction implementation method and related device Download PDFInfo
- Publication number
- CN112633885A CN112633885A CN202011640632.6A CN202011640632A CN112633885A CN 112633885 A CN112633885 A CN 112633885A CN 202011640632 A CN202011640632 A CN 202011640632A CN 112633885 A CN112633885 A CN 112633885A
- Authority
- CN
- China
- Prior art keywords
- signature
- transaction
- signature transaction
- nodes
- received
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000004590 computer program Methods 0.000 claims description 11
- 238000012545 processing Methods 0.000 claims description 8
- 230000000694 effects Effects 0.000 claims description 4
- 230000002860 competitive effect Effects 0.000 description 17
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/382—Payment protocols; Details thereof insuring higher security of transaction
- G06Q20/3825—Use of electronic signatures
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Accounting & Taxation (AREA)
- Computer Security & Cryptography (AREA)
- Finance (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application discloses a multi-signature transaction implementation method and a related device, and relates to the technical field of block chains, wherein the multi-signature transaction implementation method receives a multi-signature transaction request; triggering more than two nodes to sign the multi-signature transaction and feeding back the transaction information with the signature based on the contract and the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, the execution efficiency of the multi-signature transaction can be effectively improved.
Description
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method and a related apparatus for implementing multi-signature transaction.
Background
With the development of the times, in order to improve the security of accounts commonly held by multiple people, a multi-signature technology is developed, signatures of a preset number of holders in the holders of the accounts are required to be obtained, the accounts can be called to execute related operations (such as fund utilization), and otherwise the accounts cannot be called.
The existing multi-signature technology has the defect that when the signatures of the holders of accounts commonly held by multiple persons are acquired, corresponding multi-signature transaction streams are transmitted to the holders to carry out signature in turn until the number of signatures on the multi-signature transaction reaches the preset number, and on the premise, the larger the preset number is, the longer the time consumed for signing the multi-signature transaction is, so that the execution efficiency of the multi-signature transaction is seriously influenced.
Disclosure of Invention
The application provides a multi-signature transaction implementation method and a related device, which can effectively improve the execution efficiency of multi-signature transactions.
In order to achieve the above technical effects, a first aspect of the present application provides a multi-signature transaction implementation method, including:
receiving a multi-signature transaction request, wherein the multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
triggering the more than two nodes to respectively sign the multi-signature transaction and feeding back transaction information with the signature based on the multi-signature transaction request;
and when the transaction information fed back by the target number of nodes is received, combining the signatures carried in the received transaction information into the multi-signature transaction to obtain a combined signature transaction.
Based on the first aspect of the present application, in a first possible implementation manner, the multi-signature transaction implementation method further includes:
when the transaction information is received and the number of the received transaction information does not exceed the target number, extracting the signature in the currently received transaction information and storing the signature in a preset storage space;
the merging of the signature carried in the received transaction information into the multi-signature transaction specifically includes: and extracting and combining the signatures which are stored in the storage space and are related to the multi-signature transaction into the multi-signature transaction.
Based on the first aspect of the present application or the first possible implementation manner of the first aspect of the present application, in a second possible implementation manner, after the receiving a multi-signature transaction request, the multi-signature transaction implementation method further includes:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
and if the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
Based on the second possible implementation manner of the first aspect of the present application, in a third possible implementation manner, after determining whether the importance of the multi-signature transaction is higher than a preset value, the method for implementing the multi-signature transaction further includes:
and if the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
A second aspect of the present application provides a multi-signature transaction implementation apparatus, including:
the multi-signature transaction processing device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a multi-signature transaction request, the multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
the triggering unit is used for triggering the more than two nodes to respectively sign the multi-signature transaction and feed back the transaction information with the signature based on the multi-signature transaction request;
and the merging unit is used for merging the signatures carried in the received transaction information into the multi-signature transaction to obtain a merged signature transaction when the transaction information fed back by the target number of nodes is received.
Based on the second aspect of the present application, in a first possible implementation manner, the multi-signature transaction implementation apparatus further includes:
the extraction unit is used for extracting and storing the signature in the currently received transaction information into a preset storage space when the transaction information is received and the number of the received transaction information does not exceed the target number;
the merging unit is specifically configured to: and extracting and combining the signatures which are stored in the storage space and are related to the multi-signature transaction into the multi-signature transaction.
Based on the second aspect of the present application or the first possible implementation manner of the second aspect of the present application, in a second possible implementation manner, the multi-signature transaction implementation apparatus further includes:
a determination unit configured to:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
when the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
Based on the second possible implementation manner of the second aspect of the present application, in a third possible implementation manner, the determining unit is further configured to:
and when the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
A third aspect of the present application provides a multi-signature transaction implementation apparatus, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the multi-signature transaction implementation method mentioned in the first aspect or any one of the possible implementation manners of the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the multi-signature transaction implementation method mentioned in the first aspect or any one of the possible implementation manners of the first aspect.
As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; triggering more than two nodes simultaneously to sign the multi-signature transaction and feeding back the transaction information with the signature based on the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, all nodes which simultaneously trigger and construct multi-signature addresses can respectively sign the multi-signature transaction and feed back the transaction information with the signature, and after the target number of transaction information is received, all the received signatures are combined into the multi-signature transaction, so that the situation that different nodes need to carry out signature in turn is avoided, and the execution efficiency of the multi-signature transaction is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating an embodiment of a method for implementing a multi-signature transaction provided in the present application;
FIG. 2 is a schematic structural diagram of an embodiment of a multi-signature transaction implementation apparatus provided in the present application;
fig. 3 is a schematic structural diagram of another embodiment of a multi-signature transaction implementation apparatus provided in the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The technical solutions in the embodiments of the present application are clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part 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 given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein, and it will be apparent to those of ordinary skill in the art that the present application is not limited by the specific embodiments disclosed below.
Example one
The application provides a multi-signature transaction implementation method, as shown in fig. 1, including:
the multi-signature transaction requested by the multi-signature transaction request is related to the multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
in the embodiment of the present application, a multi-signature transaction request created by any node (may be one of the two or more nodes, may also be a node in the same block chain with the two or more nodes, and may also be a node not in the same block chain with the two or more nodes) is received.
102, simultaneously triggering more than two nodes to respectively sign the multi-signature transaction and feeding back transaction information with the signature based on the multi-signature transaction request;
in this embodiment, in response to the multi-signature transaction request, the two or more nodes may be triggered at the same time, so that the two or more nodes compete for signing the multi-signature transaction and feed back the transaction information with the signature.
In an application scenario, a competitive multi-signature contract may be created based on the multi-signature transaction request, that is, the multi-signature transaction is written into the competitive multi-signature contract, then the competitive multi-signature contract triggers the two or more nodes to check the multi-signature transaction at the same time, and when the node checks the competitive multi-signature contract, the node may perform an action of signing the multi-signature transaction and feeding back transaction information with a signature.
103, when the transaction information fed back by the target number of nodes is received, merging the signatures carried in the received transaction information into the multi-signature transaction to obtain a merged signature transaction; the merged signature transaction includes all signatures in the received transaction information, so that any node (whether the node corresponding to the multi-signature address or the nodes of other block chains) can verify the validity of the transaction information through the signatures in the merged signature transaction.
In this embodiment of the present application, after receiving the transaction information fed back by the target number of nodes, the signatures in the received transaction information may be merged, and the merged signatures are written into the multi-signature transaction, so as to enable the multi-signature transaction to take effect, where the target number is not less than the number of signatures required when the multi-signature address is called.
Optionally, the multi-signature transaction implementation method further includes:
when the transaction information is received and the number of the received transaction information does not exceed the target number, extracting the signature in the currently received transaction information and storing the signature in a preset storage space;
the merging of the signature carried in the received transaction information into the multi-signature transaction specifically includes: and extracting and combining the signatures which are stored in the storage space and are related to the multi-signature transaction into the multi-signature transaction.
Specifically, the preset storage space may be a state of the competitive multiple signature contract; when the transaction information is received and the number of the received transaction information does not exceed the target number, the signature is extracted and stored once, and the interval time for each node to sign the multi-signature transaction can be utilized to the maximum extent, so that the execution efficiency of the multi-signature transaction is improved.
Optionally, after receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
and if the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
Specifically, the updating the multi-signature transaction based on the current multi-signature address may specifically be:
generating a new transaction based on the current multi-signature address and the multi-signature transaction request;
updating the multi-signed transaction to the new transaction.
It should be noted that the number of signatures required is the number of signatures required when a multi-signature address is called; based on the steps, when the multi-signature transaction is more important (for example, when the fund amount related to the multi-signature transaction is greater than the preset fund amount, the importance degree of the multi-signature transaction can be set to be a value greater than the preset value in the multi-signature transaction request), a multi-signature address with the signature quantity larger than the original quantity is regenerated, and the new signature quantity is determined to be the target quantity, so that the technical effect that the multi-signature transaction can be continued under the condition that more people perform signature confirmation is achieved, and the reliability of the multi-signature transaction is improved.
Further, after the determining whether the importance of the multi-signature transaction is higher than a preset value, the method for implementing the multi-signature transaction further includes:
and if the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; triggering more than two nodes simultaneously to sign the multi-signature transaction and feeding back the transaction information with the signature based on the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, all nodes which simultaneously trigger and construct multi-signature addresses can respectively sign the multi-signature transaction and feed back the transaction information with the signature, and after the target number of transaction information is received, all the received signatures are combined into the multi-signature transaction, so that the situation that different nodes need to carry out signature in turn is avoided, and the execution efficiency of the multi-signature transaction is improved.
The following describes a multi-signature implementation in the embodiment of the present application in an application scenario. In the application scenario, the service related parties related to the multi-signature transaction comprise a node a, a node B, a node C and a node D, wherein the node a, the node B and the node C are one party of the multi-signature transaction, common assets of the node a, the node B and the node C are managed by a common account corresponding to a multi-signature address (the multi-signature transaction requires signatures of any two nodes of the node a, the node B and the node C to use the common account to call the common assets), the node D is the other party of the multi-signature transaction, and two parties of the multi-signature transaction are in two different block chains;
under the above premise, the complete flow of multi-signature transaction may be as follows:
the method comprises the following steps that firstly, any party in the multi-signature transaction creates a multi-signature transaction request, wherein the multi-signature transaction requested by the multi-signature transaction request needs to call the common asset;
secondly, establishing a competitive multi-signature contract based on the multi-signature transaction request, and writing the multi-signature transaction into the competitive multi-signature contract;
thirdly, writing the multi-signature transaction into a signature waiting storage space of the competitive multi-signature contract by using the multi-signature address as an identifier;
fourthly, the node A, the node B and the node C can find that one multi-signature transaction related to the node A needs to be completed in the storage space waiting for signature of the competitive multi-signature contract;
fifthly, after confirming that the multi-signature transaction is normal, the node a, the node B and the node C may extract the multi-signature transaction from the storage space waiting for signature of the competitive multi-signature contract to perform signature to generate a transaction containing signature (i.e. the transaction information with signature mentioned in the foregoing method embodiment), and then submit the transaction containing signature through the competitive multi-signature contract;
it should be noted that, due to the characteristic that the intelligent contract (the competitive multiple signature contract) is executed serially in the block chain, the actions of the node a, the node B and the node C submitting the transaction containing the signature must have an execution sequence in advance, and it is assumed that the execution sequence is that the node B submits the transaction containing the signature first, the node a submits the transaction containing the signature second and the node C submits the transaction containing the signature last;
sixthly, when the competitive multi-signature contract receives a transaction containing a signature submitted by a node B, detecting whether the multi-signature transaction is not signed; after detecting that the signature is not finished, verifying whether the signature in the transaction containing the signature submitted by the node B is correct or not; after the signature is detected to be correct, extracting the signature in the transaction containing the signature submitted by the node B and storing the signature in a signature storage space of the multi-signature transaction, wherein the signature storage space is a storage space for storing the signature in the multi-signature transaction;
seventhly, when the competitive multi-signature contract receives a transaction containing a signature submitted by the node A, detecting whether the multi-signature transaction is not signed; after the incomplete signature is detected, verifying whether the signature in the transaction containing the signature submitted by the node A is correct or not; after the signature is detected to be correct, extracting the signature in the transaction containing the signature submitted by the node A and storing the signature in a signature storage space of the multi-signature transaction;
eighthly, when the competitive multi-signature contract receives a signature-containing transaction submitted by a node C, detecting whether the multi-signature transaction is not signed; after the signature is detected to be completed (at the moment, the competitive multi-signature contract receives the signatures of the two nodes and can call the common account), discarding the transaction containing the signature submitted by the node C;
it should be noted that, after the multi-signature transaction completes the signature, the multi-signature transaction may be extracted from the competitive multi-signature contract, and the multi-signature transaction is broadcasted on the block chain where the node D is located to complete the multi-signature transaction with the node D.
Example two
As shown in fig. 2, the multi-signature transaction implementation apparatus 20 includes:
a receiving unit 201, configured to receive a multi-signature transaction request, where a multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of two or more nodes in the same block chain;
a triggering unit 202, configured to trigger the two or more nodes to respectively sign the multi-signature transaction and feed back transaction information with a signature based on the multi-signature transaction request;
a merging unit 203, configured to merge the signatures carried in the received transaction information into the multi-signature transaction when the transaction information fed back by the target number of nodes is received, so as to obtain a merged signature transaction.
Optionally, the multi-signature transaction implementation apparatus further includes:
the extraction unit is used for extracting and storing the signature in the currently received transaction information into a preset storage space when the transaction information is received and the number of the received transaction information does not exceed the target number;
the merging unit is specifically configured to: and extracting and combining the signatures which are stored in the storage space and are related to the multi-signature transaction into the multi-signature transaction.
Optionally, the multi-signature transaction implementation apparatus further includes:
a determination unit configured to:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
when the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
Further, the determining unit is further configured to:
and when the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; triggering more than two nodes simultaneously to sign the multi-signature transaction and feeding back the transaction information with the signature based on the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, all nodes which simultaneously trigger and construct multi-signature addresses can respectively sign the multi-signature transaction and feed back the transaction information with the signature, and after the target number of transaction information is received, all the received signatures are combined into the multi-signature transaction, so that the situation that different nodes need to carry out signature in turn is avoided, and the execution efficiency of the multi-signature transaction is improved.
EXAMPLE III
The present application further provides another multi-signature transaction implementation apparatus, as shown in fig. 3, the multi-signature transaction implementation apparatus in the embodiment of the present application includes: a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302, wherein: the memory 301 is used to store software programs and modules, the processor 302 executes various functional applications and data processing by operating the software programs and modules stored in the memory 301, and the memory 301 and the processor 302 are connected by a bus 303.
Specifically, the processor 302 implements the following steps by running the above-mentioned computer program stored in the memory 301:
receiving a multi-signature transaction request, wherein a multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
triggering the more than two nodes to respectively sign the multi-signature transaction and feeding back transaction information with the signature based on the multi-signature transaction request;
and when the transaction information fed back by the target number of nodes is received, combining the signatures carried in the received transaction information into the multi-signature transaction to obtain a combined signature transaction.
Assuming that the foregoing is the first possible implementation manner, in a second possible implementation manner based on the foregoing first possible implementation manner, the multi-signature transaction implementation method further includes:
when the transaction information is received and the number of the received transaction information does not exceed the target number, extracting the signature in the currently received transaction information and storing the signature in a preset storage space;
the merging of the signature carried in the received transaction information into the multi-signature transaction specifically includes: and extracting and combining the signatures which are stored in the storage space and are related to the multi-signature transaction into the multi-signature transaction.
In a third possible implementation manner based on the first or second possible implementation manner, after receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
and if the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
In a fourth possible implementation manner based on the third possible implementation manner, after the determining whether the importance of the multi-signature transaction is higher than a preset value, the method for implementing the multi-signature transaction further includes:
and if the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; triggering more than two nodes simultaneously to sign the multi-signature transaction and feeding back the transaction information with the signature based on the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, all nodes which simultaneously trigger and construct multi-signature addresses can respectively sign the multi-signature transaction and feed back the transaction information with the signature, and after the target number of transaction information is received, all the received signatures are combined into the multi-signature transaction, so that the situation that different nodes need to carry out signature in turn is avoided, and the execution efficiency of the multi-signature transaction is improved.
Example four
The present application also provides a computer readable storage medium having a computer program stored thereon, which when executed, can implement the steps provided by the above-described embodiments. Specifically, the computer program includes computer program code, which may be in one of a source code form, an object code form, an executable file or some intermediate form, and is not limited herein; the computer readable storage medium can be any entity or device capable of carrying the above computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium, and is not limited herein. It should be noted that the contents contained in the computer-readable storage medium can be increased or decreased as required by legislation and patent practice in the jurisdiction.
As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; triggering more than two nodes simultaneously to sign the multi-signature transaction and feeding back the transaction information with the signature based on the multi-signature transaction request; when transaction information fed back by a target number of nodes is received, the signatures carried by the received transaction information are merged into multi-signature transactions to obtain merged signature transactions. Based on the technical scheme of the application, all nodes which simultaneously trigger and construct multi-signature addresses can respectively sign the multi-signature transaction and feed back the transaction information with the signature, and after the target number of transaction information is received, all the received signatures are combined into the multi-signature transaction, so that the situation that different nodes need to carry out signature in turn is avoided, and the execution efficiency of the multi-signature transaction is improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be noted that, the methods and the details thereof provided by the foregoing embodiments may be combined with the apparatuses and devices provided by the embodiments, which are referred to each other and are not described again.
Those of ordinary skill in the art would appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described apparatus/device embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and the actual implementation may be implemented by another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. A multi-signature transaction implementation method is characterized by comprising the following steps:
receiving a multi-signature transaction request, wherein the multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
triggering the more than two nodes to respectively sign the multi-signature transaction and feeding back transaction information with the signature based on the multi-signature transaction request;
and when the transaction information fed back by the target number of nodes is received, combining the signatures carried in the received transaction information into the multi-signature transaction to obtain a combined signature transaction.
2. The multi-signature transaction implementation method of claim 1, further comprising:
when the transaction information is received and the number of the received transaction information does not exceed the target number, extracting the signature in the currently received transaction information and storing the signature in a preset storage space;
the merging the signature carried in the received transaction information into the multi-signature transaction specifically includes: extracting and merging the signatures stored in the storage space and related to the multi-signature transaction into the multi-signature transaction.
3. The multi-signature transaction implementation method of claim 1 or 2, wherein after the receiving a multi-signature transaction request, the multi-signature transaction implementation method further comprises:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
if the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, then updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
4. The method of claim 3, wherein after determining whether the importance of the multi-signature transaction is higher than a predetermined value, the method further comprises:
and if the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
5. A multi-signature transaction effecting device, comprising:
the multi-signature transaction processing device comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving a multi-signature transaction request, the multi-signature transaction requested by the multi-signature transaction request is related to a multi-signature account, the multi-signature account corresponds to a multi-signature address, and the multi-signature address is constructed based on public keys of more than two nodes in the same block chain;
the triggering unit is used for triggering the more than two nodes to respectively sign the multi-signature transaction and feed back the transaction information with the signature based on the multi-signature transaction request;
and the merging unit is used for merging the signatures carried in the received transaction information into the multi-signature transaction to obtain a merged signature transaction when the transaction information fed back by the target number of nodes is received.
6. The multi-signature transaction implementation device of claim 5, further comprising:
the extracting unit is used for extracting and storing the signature in the currently received transaction information into a preset storage space when the transaction information is received and the number of the received transaction information does not exceed the target number;
the merging unit is specifically configured to: extracting and merging the signatures stored in the storage space and related to the multi-signature transaction into the multi-signature transaction.
7. The multi-signature transaction implementation device of claim 5 or 6, further comprising:
a determination unit configured to:
based on the multi-signature transaction request, judging whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request comprises: the importance of the multi-signature transaction;
when the importance of the multi-signature transaction is higher than the preset value, updating the number of the multi-signature addresses needing to be signed based on the importance of the multi-signature transaction, acquiring the public keys of the more than two nodes, updating the multi-signature addresses based on the public keys of the more than two nodes and the number of the multi-signature addresses needing to be signed, then updating the multi-signature transaction based on the current multi-signature addresses, and determining the number of the multi-signature addresses needing to be signed as a target number.
8. The multi-signature transaction implementation device of claim 7, wherein the determination unit is further configured to:
and when the importance of the multi-signature transaction is not higher than the preset value, determining the current number of the multi-signature addresses needing to be signed as a target number.
9. A multi-signature transaction effecting device comprising a memory and a processor, the memory storing a computer program which when executed by the processor effects the steps of the method of any one of claims 1 to 4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011640632.6A CN112633885A (en) | 2020-12-31 | 2020-12-31 | Multi-signature transaction implementation method and related device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011640632.6A CN112633885A (en) | 2020-12-31 | 2020-12-31 | Multi-signature transaction implementation method and related device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112633885A true CN112633885A (en) | 2021-04-09 |
Family
ID=75290498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011640632.6A Pending CN112633885A (en) | 2020-12-31 | 2020-12-31 | Multi-signature transaction implementation method and related device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112633885A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221806A (en) * | 2021-12-14 | 2022-03-22 | 深圳市电子商务安全证书管理有限公司 | Block chain-based data storage method and device, computer equipment and medium |
CN114785800A (en) * | 2022-03-31 | 2022-07-22 | 蚂蚁区块链科技(上海)有限公司 | Cross-link communication method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110247774A (en) * | 2019-06-28 | 2019-09-17 | 深圳市网心科技有限公司 | A kind of the common recognition method and relevant device of block chain data |
CN111161056A (en) * | 2018-11-07 | 2020-05-15 | 新明华区块链技术(深圳)有限公司 | Method, system and equipment for improving transaction security of digital assets |
CN111556120A (en) * | 2020-04-23 | 2020-08-18 | 财付通支付科技有限公司 | Data processing method and device based on block chain, storage medium and equipment |
-
2020
- 2020-12-31 CN CN202011640632.6A patent/CN112633885A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111161056A (en) * | 2018-11-07 | 2020-05-15 | 新明华区块链技术(深圳)有限公司 | Method, system and equipment for improving transaction security of digital assets |
CN110247774A (en) * | 2019-06-28 | 2019-09-17 | 深圳市网心科技有限公司 | A kind of the common recognition method and relevant device of block chain data |
CN111556120A (en) * | 2020-04-23 | 2020-08-18 | 财付通支付科技有限公司 | Data processing method and device based on block chain, storage medium and equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114221806A (en) * | 2021-12-14 | 2022-03-22 | 深圳市电子商务安全证书管理有限公司 | Block chain-based data storage method and device, computer equipment and medium |
CN114221806B (en) * | 2021-12-14 | 2023-11-03 | 深圳市电子商务安全证书管理有限公司 | Block chain-based data storage method, device, computer equipment and medium |
CN114785800A (en) * | 2022-03-31 | 2022-07-22 | 蚂蚁区块链科技(上海)有限公司 | Cross-link communication method and device |
CN114785800B (en) * | 2022-03-31 | 2024-06-11 | 蚂蚁区块链科技(上海)有限公司 | Cross-link communication method, device, storage medium and computing equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109934593A (en) | For realizing the design method and equipment of the block catenary system for supporting multi-signature | |
CN112633885A (en) | Multi-signature transaction implementation method and related device | |
CN109993651B (en) | Data accounting service instruction set checking method, device, computer equipment and medium | |
CN110175833B (en) | Computer device, method, system and medium for binding bank card information | |
CN112950201B (en) | Node management method and related device applied to block chain system | |
CN110138767B (en) | Transaction request processing method, device, equipment and storage medium | |
CN111507717A (en) | Data processing method, device, block node and computer readable storage medium | |
CN113064759A (en) | Block chain data rollback processing method and processing system thereof | |
WO2021129005A1 (en) | Blockchain state change-based transaction tracking method and device | |
CN111260364B (en) | Block chain-based extensible quick payment method and system | |
CN113312675A (en) | Attribute checking method and device, electronic equipment and storage medium | |
CN112258188A (en) | Processing method, device, equipment and system for block chain transaction | |
CN110347657B (en) | Data generation method, device, electronic equipment and storage medium | |
CN110119429B (en) | Data processing method, data processing device, computer equipment and storage medium | |
CN116993523A (en) | Configurable account checking method, device, equipment and storage medium | |
CN114971598B (en) | Wind-controlled approval system, method, equipment and medium | |
CN111210345B (en) | Signature method and device based on block chain network transaction and terminal equipment | |
CN115037472B (en) | Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment | |
CN112819464B (en) | Intelligent contract processing method, processing device, terminal equipment and storage medium | |
CN115756966A (en) | Block chain data archiving and recovering method and system | |
CN109299948A (en) | A kind of red packet sending method, device, wearable device and storage medium | |
CN115061924A (en) | Automatic test case generation method and generation device | |
CN111367694B (en) | Event processing method, server and computer storage medium | |
CN114240436A (en) | Electronic certificate verification and cancellation method and device, computer equipment and storage medium | |
CN112822022B (en) | Multi-signature address updating method and related device |
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 |