A multi-signature transaction implementation method and related device
By triggering multiple nodes to sign and merge signature information on the blockchain, the problem of time-consuming multi-signature transactions is solved, and the efficiency of multi-signature transactions is improved.
Patent Information
- Application Number
- CN202011640632.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-12-31
AI Technical Summary
When the existing multi-signature technology acquires signatures of account holders jointly held by multiple people, the signature process takes a long time, which seriously affects the execution efficiency of multi-signature transactions.
By receiving a multi-signature transaction request, multiple nodes are triggered to sign multi-signature transactions at the same time and feedback signature information. When the target number is reached, the signatures are merged into the multi-signature transaction, avoiding the process of nodes taking turns to sign.
It improves the execution efficiency of multi-signature transactions and reduces the time overhead of the signature process.
Smart Images

Figure CN112633885B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a multi-signature transaction implementation method and related devices. Background Art
[0002] With the development of the times, in order to improve the security of accounts held by multiple people, multi-signature technology came into being. The signatures of a preset number of holders of such accounts are required to call such accounts to perform related operations (such as using funds). Otherwise, such accounts cannot be called.
[0003] The defect of existing multi-signature technology is that when obtaining the signatures of the holders of an account jointly held by multiple people, the corresponding multi-signature transaction is usually passed to each holder in turn for signature until the number of signatures on the multi-signature transaction reaches the above-mentioned preset number. Under this premise, the larger the preset number, the longer it takes to sign the multi-signature transaction, which seriously affects the execution efficiency of the multi-signature transaction. Summary of the invention
[0004] The present application provides a multi-signature transaction implementation method and related devices, which can effectively improve the execution efficiency of multi-signature transactions.
[0005] In order to achieve the above technical effects, the first aspect of the present application provides a multi-signature transaction implementation method, including:
[0006] 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 two or more nodes in the same blockchain;
[0007] Based on the multi-signature transaction request, the two or more nodes are triggered to sign the multi-signature transaction and feedback the signed transaction information;
[0008] When the above transaction information fed back by the target number of nodes is received, the signature carried in the above transaction information received is merged into the above multi-signature transaction to obtain a merged signature transaction.
[0009] Based on the first aspect of the present application, in a first possible implementation manner, the multi-signature transaction implementation method further includes:
[0010] When each transaction information is received and the number of received transaction information does not exceed the target number, the signature in the currently received transaction information is extracted and stored in a preset storage space;
[0011] The above-mentioned merging the signature carried in the above-mentioned transaction information that has been received into the above-mentioned multi-signature transaction specifically includes: extracting the signature related to the above-mentioned multi-signature transaction stored in the above-mentioned storage space and merging it into the above-mentioned multi-signature transaction.
[0012] Based on the first aspect of the present application or the first possible implementation of the first aspect of the present application, in a second possible implementation, after receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes:
[0013] Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction;
[0014] If the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. After that, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
[0015] Based on the second possible implementation of the first aspect of the present application, in a third possible implementation, after determining whether the importance of the multi-signature transaction is higher than a preset value, the multi-signature transaction implementation method further includes:
[0016] If the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
[0017] The second aspect of the present application provides a multi-signature transaction implementation device, including:
[0018] A receiving unit, configured to receive 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 two or more nodes in the same blockchain;
[0019] A triggering unit, configured to simultaneously trigger the two or more nodes to sign the multi-signature transaction respectively based on the multi-signature transaction request and feedback the signed transaction information;
[0020] The merging unit is used to merge the signatures carried in the received transaction information into the multi-signature transaction when receiving the transaction information fed back by the target number of nodes, so as to obtain a merged signature transaction.
[0021] Based on the second aspect of the present application, in a first possible implementation manner, the multi-signature transaction implementation device further includes:
[0022] an extraction unit, configured to extract the signature from the currently received transaction information and store it into a preset storage space each time the transaction information is received and the number of the received transaction information does not exceed the target number;
[0023] The merging unit is specifically used to extract the signatures related to the multi-signature transaction stored in the storage space and merge them into the multi-signature transaction.
[0024] Based on the second aspect of the present application or the first possible implementation of the second aspect of the present application, in a second possible implementation, the multi-signature transaction implementation device further includes:
[0025] Identify units for:
[0026] Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction;
[0027] When the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. After that, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
[0028] 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:
[0029] When the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
[0030] In a third aspect, the present application provides a multi-signature transaction implementation device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the multi-signature transaction implementation method mentioned in the first aspect or any possible implementation manner of the first aspect are implemented.
[0031] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the multi-signature transaction implementation method mentioned in the first aspect or any possible implementation manner of the first aspect are implemented.
[0032] As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; based on the multi-signature transaction request, it simultaneously triggers two or more nodes to sign the multi-signature transaction and feedback the signed transaction information; when the transaction information fed back by the target number of nodes is received, the signature carried by the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction. Based on the technical solution of the present application, each node that constructs a multi-signature address can be simultaneously triggered to sign the multi-signature transaction and feedback the signed transaction information, and after receiving the target number of transaction information, each received signature is merged into the multi-signature transaction, avoiding the situation where different nodes need to sign in turn, thereby improving the execution efficiency of multi-signature transactions. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 A schematic diagram of a multi-signature transaction implementation method according to an embodiment of the present invention;
[0035] Figure 2 This is a schematic diagram of the structure of an embodiment of a multi-signature transaction implementation device provided by this application;
[0036] Figure 3 This is a schematic diagram of the structure of another embodiment of the multi-signature transaction implementation device provided by this application. DETAILED DESCRIPTION
[0037] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0038] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0039] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0040] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0041] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0042] Embodiment 1
[0043] This application provides a multi-signature transaction implementation method, such as Figure 1 As shown, including:
[0044] Step 101, receiving a multi-signature transaction request;
[0045] 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 the public keys of more than two nodes in the same blockchain;
[0046] In an embodiment of the present application, a multi-signature transaction request created by any node (which may be one of the above-mentioned two or more nodes, or a node in the same blockchain as the above-mentioned two or more nodes, or a node not in the same blockchain as the above-mentioned two or more nodes) is received.
[0047] Step 102: based on the multi-signature transaction request, trigger two or more nodes to sign the multi-signature transaction and feedback the signed transaction information;
[0048] In an embodiment of the present application, in response to the multi-signature transaction request, the two or more nodes may be triggered simultaneously so that the two or more nodes compete to sign the multi-signature transaction and feed back the signed transaction information.
[0049] In one application scenario, a competitive multi-signature contract can be created based on the multi-signature transaction request, that is, the multi-signature transaction is written into the competitive multi-signature contract, and then the competitive multi-signature contract is used to simultaneously trigger the two or more nodes to view the multi-signature transaction. When the node views the competitive multi-signature contract, the node will execute the action of signing the multi-signature transaction and feedback the signed transaction information.
[0050] Step 103, when the above-mentioned transaction information fed back by the target number of nodes is received, the signature carried in the above-mentioned transaction information that has been received is merged into the above-mentioned multi-signature transaction to obtain a merged signature transaction; the merged signature transaction contains all the signatures in the received transaction information, so any node (whether it is the node corresponding to the above-mentioned multi-signature address or the node of other blockchains) can verify its validity through the signature information on the merged signature transaction.
[0051] In an embodiment of the present application, after receiving the above-mentioned transaction information fed back by the target number of nodes, the signatures in the received transaction information can be merged, and the merged signatures can be written into the above-mentioned multi-signature transaction to make the multi-signature transaction effective, wherein the above-mentioned target number is not less than the number of signatures required when calling the above-mentioned multi-signature address.
[0052] Optionally, the above multi-signature transaction implementation method further includes:
[0053] When each transaction information is received and the number of received transaction information does not exceed the target number, the signature in the currently received transaction information is extracted and stored in a preset storage space;
[0054] The above-mentioned merging the signature carried in the above-mentioned transaction information that has been received into the above-mentioned multi-signature transaction specifically includes: extracting the signature related to the above-mentioned multi-signature transaction stored in the above-mentioned storage space and merging it into the above-mentioned multi-signature transaction.
[0055] Specifically, the preset storage space may be the state of the competitive multi-signature contract; each time the transaction information is received and the number of the received transaction information does not exceed the target number, a signature extraction and storage operation is performed, which can maximize the use of the interval time for each node to sign the multi-signature transaction, so as to improve the execution efficiency of the multi-signature transaction.
[0056] Optionally, after receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes:
[0057] Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction;
[0058] If the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. After that, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
[0059] Specifically, the above-mentioned updating of the above-mentioned multi-signature transaction based on the current above-mentioned multi-signature address can be specifically as follows:
[0060] Generate a new transaction based on the current multi-signature address and the multi-signature transaction request;
[0061] Update the multi-signature transaction to the new transaction.
[0062] It should be noted that the above-mentioned number of signatures required is the number of signatures required when calling a multi-signature address; based on the above steps, when the above-mentioned multi-signature transaction is more important (for example, when the amount of funds involved in the above-mentioned multi-signature transaction is greater than the preset amount of funds, the importance of the multi-signature transaction can be set to a value greater than the preset value in the above-mentioned multi-signature transaction request), a multi-signature address with a larger number of signatures required than the original one can be regenerated, and the new number of signatures required is determined as the target number, so as to achieve the technical effect that the multi-signature transaction can only be continued when more people sign and confirm, thereby improving the reliability of the multi-signature transaction.
[0063] Furthermore, after determining whether the importance of the multi-signature transaction is higher than a preset value, the multi-signature transaction implementation method further includes:
[0064] If the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
[0065] As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; based on the multi-signature transaction request, it simultaneously triggers two or more nodes to sign the multi-signature transaction and feedback the signed transaction information; when the transaction information fed back by the target number of nodes is received, the signature carried by the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction. Based on the technical solution of the present application, each node that constructs a multi-signature address can be simultaneously triggered to sign the multi-signature transaction and feedback the signed transaction information, and after receiving the target number of transaction information, each received signature is merged into the multi-signature transaction, avoiding the situation where different nodes need to sign in turn, thereby improving the execution efficiency of multi-signature transactions.
[0066] The following is an application scenario to illustrate the multi-signature implementation method in the embodiment of the present application. In this application scenario, the business stakeholders involved in the multi-signature transaction include Node A, Node B, Node C and Node D, where Node A, Node B and Node C are one party to the multi-signature transaction, and the common assets of Node A, Node B and Node C are managed by a common account corresponding to a multi-signature address (the multi-signature transaction requires the signatures of any two nodes among Node A, Node B and Node C to use the common account to call the common assets), Node D is the other party to the multi-signature transaction, and the two parties to the multi-signature transaction are in two different blockchains;
[0067] Under the above premise, the complete process of multi-signature transaction can be as follows:
[0068] In the first step, 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 above-mentioned common assets;
[0069] The second step is to create a competing multi-signature contract based on the multi-signature transaction request, and write the multi-signature transaction into the competing multi-signature contract;
[0070] Step 3: Write the multi-signature transaction into the storage space waiting for signature of the competitive multi-signature contract using the multi-signature address as an identifier;
[0071] In the fourth step, Node A, Node B, and Node C can all find that there is a multi-signature transaction involving themselves that needs to be completed in the storage space waiting for signature of the above competitive multi-signature contract;
[0072] Step 5: After confirming that the multi-signature transaction is normal, node A, node B, and node C can extract the multi-signature transaction from the storage space waiting for signature of the competitive multi-signature contract to sign and generate a signed transaction (i.e., the signed transaction information mentioned in the aforementioned method embodiment), and then submit the signed transaction through the competitive multi-signature contract respectively;
[0073] It should be noted that due to the serial execution characteristics of smart contracts on the blockchain (the above-mentioned competitive multi-signature contracts), the actions of nodes A, B, and C in submitting transactions containing signatures must be executed in a certain order. Here, it is assumed that the execution order is that node B submits the transaction containing signatures first, node A submits the transaction containing signatures second, and node C submits the transaction containing signatures last;
[0074] Step 6. When the competitive multi-signature contract receives the signed transaction submitted by Node B, it detects whether the multi-signature transaction has not been signed. After detecting that the signature is not completed, it verifies whether the signature in the signed transaction submitted by Node B is correct. After detecting that the signature is correct, it extracts the signature in the signed transaction submitted by Node B and stores it in the signature storage space of the multi-signature transaction, which is the storage space used by the multi-signature transaction to store signatures.
[0075] Step 7: When the competitive multi-signature contract receives the signed transaction submitted by node A, it detects whether the multi-signature transaction has not been signed. After detecting that the signature is not completed, it verifies whether the signature in the signed transaction submitted by node A is correct. After detecting that the signature is correct, it extracts the signature in the signed transaction submitted by node A and stores it in the signature storage space of the multi-signature transaction.
[0076] Step 8. When the competitive multi-signature contract receives the signed transaction submitted by node C, it detects whether the multi-signature transaction has not been signed. After detecting that the signature has been completed (the competitive multi-signature contract has received the signatures of two nodes and can call the common account), the signed transaction submitted by node C is discarded.
[0077] It should be noted that after the above-mentioned multi-signature transaction is signed, the above-mentioned multi-signature transaction can be extracted from the above-mentioned competitive multi-signature contract, and the multi-signature transaction can be broadcast on the blockchain where the D node is located to complete the multi-signature transaction with the D node.
[0078] Embodiment 2
[0079] This application provides a multi-signature transaction implementation device, such as Figure 2 As shown, the multi-signature transaction implementation device 20 includes:
[0080] The receiving unit 201 is configured to receive a multi-signature transaction request, wherein 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 two or more nodes in the same blockchain;
[0081] The triggering unit 202 is used to simultaneously trigger the two or more nodes to sign the multi-signature transaction and feedback the signed transaction information based on the multi-signature transaction request;
[0082] The merging unit 203 is used to merge the signatures carried in the received transaction information into the multi-signature transaction when receiving the transaction information fed back by the target number of nodes, so as to obtain a merged signature transaction.
[0083] Optionally, the multi-signature transaction implementation device further includes:
[0084] an extraction unit, configured to extract the signature from the currently received transaction information and store it into a preset storage space each time the transaction information is received and the number of the received transaction information does not exceed the target number;
[0085] The merging unit is specifically used to extract the signatures related to the multi-signature transaction stored in the storage space and merge them into the multi-signature transaction.
[0086] Optionally, the multi-signature transaction implementation device further includes:
[0087] Identify units for:
[0088] Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction;
[0089] When the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. After that, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
[0090] Furthermore, the above-mentioned determination unit is also used for:
[0091] When the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
[0092] As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; based on the multi-signature transaction request, it simultaneously triggers two or more nodes to sign the multi-signature transaction and feedback the signed transaction information; when the transaction information fed back by the target number of nodes is received, the signature carried by the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction. Based on the technical solution of the present application, each node that constructs a multi-signature address can be simultaneously triggered to sign the multi-signature transaction and feedback the signed transaction information, and after receiving the target number of transaction information, each received signature is merged into the multi-signature transaction, avoiding the situation where different nodes need to sign in turn, thereby improving the execution efficiency of multi-signature transactions.
[0093] Embodiment 3
[0094] This application also provides another multi-signature transaction implementation device, such as Figure 3As shown, the multi-signature transaction implementation device 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 running the software programs and modules stored in the memory 301, and the memory 301 and the processor 302 are connected via a bus 303.
[0095] Specifically, the processor 302 implements the following steps by running the above computer program stored in the memory 301:
[0096] Receiving a multi-signature transaction request, wherein 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 two or more nodes in the same blockchain;
[0097] Based on the multi-signature transaction request, the two or more nodes are triggered to sign the multi-signature transaction and feedback the signed transaction information;
[0098] When the above transaction information fed back by the target number of nodes is received, the signature carried in the above transaction information received is merged into the above multi-signature transaction to obtain a merged signature transaction.
[0099] Assuming that the above is the first possible implementation, in a second possible implementation based on the first possible implementation, the multi-signature transaction implementation method further includes:
[0100] When each transaction information is received and the number of received transaction information does not exceed the target number, the signature in the currently received transaction information is extracted and stored in a preset storage space;
[0101] The above-mentioned merging the signature carried in the above-mentioned transaction information that has been received into the above-mentioned multi-signature transaction specifically includes: extracting the signature related to the above-mentioned multi-signature transaction stored in the above-mentioned storage space and merging it into the above-mentioned multi-signature transaction.
[0102] In a third possible implementation based on the first or second possible implementation, after receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes:
[0103] Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction;
[0104] If the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. After that, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
[0105] In a fourth possible implementation based on the third possible implementation, after determining whether the importance of the multi-signature transaction is higher than a preset value, the multi-signature transaction implementation method further includes:
[0106] If the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
[0107] As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; based on the multi-signature transaction request, it simultaneously triggers two or more nodes to sign the multi-signature transaction and feedback the signed transaction information; when the transaction information fed back by the target number of nodes is received, the signature carried by the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction. Based on the technical solution of the present application, each node that constructs a multi-signature address can be simultaneously triggered to sign the multi-signature transaction and feedback the signed transaction information, and after receiving the target number of transaction information, each received signature is merged into the multi-signature transaction, avoiding the situation where different nodes need to sign in turn, thereby improving the execution efficiency of multi-signature transactions.
[0108] Embodiment 4
[0109] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. Specifically, the computer program includes a computer program code, and the above computer program code can be in source code form, object code form, executable file or some intermediate form, which is not limited here; the computer-readable storage medium can be any entity or device that can carry the above computer program code, recording medium, U disk, mobile hard disk, disk, CD, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, which is not limited here. It should be noted that the content contained in the above computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0110] As can be seen from the above, the technical solution of the present application receives a multi-signature transaction request; based on the multi-signature transaction request, it simultaneously triggers two or more nodes to sign the multi-signature transaction and feedback the signed transaction information; when the transaction information fed back by the target number of nodes is received, the signature carried by the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction. Based on the technical solution of the present application, each node that constructs a multi-signature address can be simultaneously triggered to sign the multi-signature transaction and feedback the signed transaction information, and after receiving the target number of transaction information, each received signature is merged into the multi-signature transaction, avoiding the situation where different nodes need to sign in turn, thereby improving the execution efficiency of multi-signature transactions.
[0111] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
[0112] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0113] It should be noted that the methods and detailed examples provided in the above embodiments can be combined with the devices and equipment provided in the embodiments, and references can be made to each other, and no further details will be given.
[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0115] In the embodiments provided in the present application, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / equipment embodiments described above are only schematic, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0116] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A multi-signature transaction implementation method, characterized in that: include: Receiving a multi-signature transaction request created by an arbitrary node, 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, the multi-signature address is constructed based on public keys of two or more nodes in the same blockchain, and the arbitrary node is one of the two or more nodes, a node in the same blockchain as the two or more nodes, or a node not in the same blockchain as the two or more nodes; After creating a competitive multi-signature contract based on the multi-signature transaction request, the two or more nodes are simultaneously triggered to view the multi-signature transaction through the competitive multi-signature contract. When the competitive multi-signature contract is viewed, the multi-signature transaction is signed and the signed transaction information is fed back; When the transaction information fed back by the target number of nodes is received, the signature carried in the received transaction information is merged into the multi-signature transaction to obtain a merged signature transaction; The multi-signature transaction implementation method further includes: Each time the transaction information is received and the number of the received transaction information does not exceed the target number, the signature in the currently received transaction information is extracted and stored in a preset storage space, and the preset storage space is the state of the competitive multi-signature contract.
2. The multi-signature transaction implementation method according to claim 1, characterized in that: The step of merging the signature carried in the received transaction information into the multi-signature transaction specifically comprises: extracting the signature related to the multi-signature transaction stored in the storage space and merging it into the multi-signature transaction.
3. The multi-signature transaction implementation method according to claim 1 or 2, characterized in that: After receiving the multi-signature transaction request, the multi-signature transaction implementation method further includes: Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction; If the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required. Thereafter, the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
4. The multi-signature transaction implementation method according to claim 3, characterized in that: After determining whether the importance of the multi-signature transaction is higher than a preset value, the multi-signature transaction implementation method further includes: If the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
5. A multi-signature transaction implementation device, characterized in that: include: a receiving unit, configured to receive a multi-signature transaction request created by an arbitrary node, 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, the multi-signature address is constructed based on public keys of two or more nodes in the same blockchain, and the arbitrary node is one of the two or more nodes, a node in the same blockchain as the two or more nodes, or a node not in the same blockchain as the two or more nodes; a triggering unit, configured to, after creating a competitive multi-signature contract based on the multi-signature transaction request, trigger the two or more nodes to simultaneously view the multi-signature transaction through the competitive multi-signature contract, and when viewing the competitive multi-signature contract, sign the multi-signature transaction and feed back the signed transaction information; a merging unit, configured to merge the signatures carried in the received transaction information into the multi-signature transaction when receiving the transaction information fed back by the target number of nodes, so as to obtain a merged signature transaction; Wherein, the multi-signature transaction implementation device further includes: The extraction unit is used to extract the signature in the currently received transaction information and store it into a preset storage space each time the transaction information is received and the number of the received transaction information does not exceed the target number. The preset storage space is the state of the competitive multi-signature contract.
6. The multi-signature transaction implementation device according to claim 5, characterized in that: The merging unit is specifically used to extract the signature related to the multi-signature transaction stored in the storage space and merge it into the multi-signature transaction.
7. The multi-signature transaction implementation device according to claim 5 or 6, characterized in that: The multi-signature transaction implementation device also includes: Identify units for: Based on the multi-signature transaction request, determining whether the importance of the multi-signature transaction is higher than a preset value, wherein the multi-signature transaction request includes: the importance of the multi-signature transaction; When the importance of the multi-signature transaction is higher than the preset value, the number of signatures required for the multi-signature address is updated based on the importance of the multi-signature transaction, and the public keys of the two or more nodes are obtained, and the multi-signature address is updated based on the public keys of the two or more nodes and the number of signatures required, and then the multi-signature transaction is updated based on the current multi-signature address, and the number of signatures required is determined as the target number.
8. The multi-signature transaction implementation device according to claim 7, characterized in that: The determining unit is further configured to: When the importance of the multi-signature transaction is not higher than the preset value, the current number of signatures required for the multi-signature address is determined as the target number.
9. A multi-signature transaction implementation device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
