CN114372280A - Block chain service execution method and device based on multi-sign intelligent contract - Google Patents

Block chain service execution method and device based on multi-sign intelligent contract Download PDF

Info

Publication number
CN114372280A
CN114372280A CN202111599106.4A CN202111599106A CN114372280A CN 114372280 A CN114372280 A CN 114372280A CN 202111599106 A CN202111599106 A CN 202111599106A CN 114372280 A CN114372280 A CN 114372280A
Authority
CN
China
Prior art keywords
service
voting
list
intelligent contract
passing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111599106.4A
Other languages
Chinese (zh)
Inventor
王晓亮
张亚宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Rivtower Technology Co Ltd
Original Assignee
Hangzhou Rivtower Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Rivtower Technology Co Ltd filed Critical Hangzhou Rivtower Technology Co Ltd
Priority to CN202111599106.4A priority Critical patent/CN114372280A/en
Publication of CN114372280A publication Critical patent/CN114372280A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

A block chain business execution method and device based on a multi-sign intelligent contract are disclosed, wherein the method is applied to any block chain node; the method comprises the following steps: deploying a plurality of intelligent contracts; receiving a service execution request, generating a voting invitation corresponding to the service execution request and sending the voting invitation to an account with voting right under the condition that an initiator account of the service execution request belongs to an account with voting right and a target service indicated by the service execution request belongs to a service supported by the multi-sign intelligent contract; receiving the voting content fed back by the account with the voting right aiming at the voting invitation, and checking the legality of a signature in the voting content; determining whether the voting content passing the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service. The reliability of the group decision execution service can be improved by applying the scheme.

Description

Block chain service execution method and device based on multi-sign intelligent contract
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a method and an apparatus for performing a blockchain service based on a multi-sign intelligent contract.
Background
In the block chain technology, also called as distributed ledger technology, a technology in which a plurality of computing devices participate in "accounting" together and maintain a complete distributed database together is provided. In actual business, in order to improve the safety of businesses such as transfer and the like, the possibility that passwords are cracked and chain assets are stolen can be reduced through a longer secret key and a more complex encryption verification algorithm.
However, the longer key and the more complex encryption verification algorithm only can guarantee the attack and defense of the personnel outside the system, but cannot prevent the internal personnel holding the key from doing harm; that is, the existing service execution schemes are not secure enough.
Disclosure of Invention
In view of this, the present specification discloses a method and an apparatus for performing a blockchain service based on a multi-sign intelligent contract.
According to a first aspect of the embodiments of the present specification, a block chain service execution method based on a multi-sign intelligent contract is disclosed, which is applied to any block chain node; the method comprises the following steps:
deploying a plurality of intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
receiving a service execution request, generating a voting invitation corresponding to the service execution request and sending the voting invitation to an account in the first list under the condition that an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list;
receiving voting content fed back by the account in the first list aiming at the voting invitation, and checking the legality of a signature in the voting content;
determining whether the voting content passing the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
Optionally, the determining whether the voting content that passes the validity check meets a preset passing condition includes:
reading a preset service-passing condition corresponding relation table from a storage area corresponding to the multiple intelligent contracts, and searching a passing condition corresponding to the target service;
and determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
Optionally, the passing conditions include any one or more of the following:
the number of votes passing the validity check is not less than a preset threshold value;
the number of voting weighted votes passing the validity check is not less than a preset threshold value;
the votes passed by the validity check do not contain a negative vote.
Optionally, the target service includes a call service contract; the method further comprises the following steps:
after the multi-sign intelligent contract is deployed, deploying a service contract, wherein a legal calling initiating address of the service contract is specified as an address of the multi-sign intelligent contract;
the executing the target service includes:
and taking the address of the multi-label intelligent contract as an initiating address, and initiating contract invoking transaction to the service contract.
Optionally, the target service includes an on-chain transfer; the executing the target service includes:
constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request;
and issuing the chain on-account transaction to the blockchain.
Optionally, the target service includes a modification service for the first list and/or the second list and/or a preset passing condition;
the executing the target service includes:
and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request.
According to a second aspect of the embodiments of the present specification, a block chain service execution device based on a multi-sign intelligent contract is disclosed, which is applied to any block chain node; the method comprises the following steps:
the first deployment module is used for deploying the multiple intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
the invitation module is used for receiving a service execution request, generating a voting invitation corresponding to the service execution request under the condition that an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list, and sending the voting invitation to an account in the first list;
the verification module is used for receiving voting content fed back by the account in the first list aiming at the voting invitation and verifying the legality of a signature in the voting content;
the execution module is used for determining whether the voting content passing the validity check meets the preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
Optionally, the execution module further:
reading a preset service-passing condition corresponding relation table from a storage area corresponding to the multiple intelligent contracts, and searching a passing condition corresponding to the target service; and determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
Optionally, the passing conditions include any one or more of the following:
the number of votes passing the validity check is not less than a preset threshold value;
the number of voting weighted votes passing the validity check is not less than a preset threshold value;
the votes passed by the validity check do not contain a negative vote.
Optionally, the target service includes a call service contract; the device further comprises:
the second deployment module is used for deploying the service contract after the multi-sign intelligent contract is deployed, wherein the legal calling initiating address of the service contract is specified as the address of the multi-sign intelligent contract;
the execution module further:
and taking the address of the multi-label intelligent contract as an initiating address, and initiating contract invoking transaction to the service contract.
Optionally, the target service includes an on-chain transfer; the execution module further:
constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request;
and issuing the chain on-account transaction to the blockchain.
Optionally, the target service includes a modification service for the first list and/or the second list and/or a preset passing condition;
the execution module further:
and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request.
According to a third aspect of the embodiments of the present specification, a computer device is disclosed, which at least comprises a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of the above-mentioned aspect embodiments when executing the program.
According to a fourth aspect of embodiments herein, a computer-readable storage medium is disclosed, on which a computer program is stored, which, when executed by a processor, implements the method of any of the above-described aspect embodiments.
In the above technical solution, the multi-sign intelligent contract includes a first list describing an account with voting right and a second list describing services supported by the multi-sign intelligent contract, and invites the account with voting right to vote for service execution by means of voting invitation, so that if a target service is finally executed successfully, voting content that passes the validity check needs to meet a preset passing condition; therefore, the distributed implementation of the decision-making right is realized, the unilateral malicious action of the node is avoided, and the safety of the assets of the users on the chain can be guaranteed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this specification and together with the description, serve to explain the principles.
FIG. 1 is a flow diagram illustrating the deployment and invocation of an intelligent contract according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method for performing blockchain business based on multiple intelligent contracts according to an embodiment of the present disclosure;
FIG. 3 is an exemplary diagram illustrating an interaction for completing a target service based on a multi-sign intelligent contract, according to the present disclosure;
fig. 4 is a diagram illustrating an exemplary structure of a blockchain service execution device based on a multi-sign intelligent contract;
fig. 5 is a diagram illustrating an exemplary configuration of a computer device for block chain service execution based on a multi-sign intelligent contract.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in one or more embodiments of the present disclosure, the technical solutions in one or more embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in one or more embodiments of the present disclosure. It is to be understood that the described embodiments are only a few, and not all embodiments. All other embodiments that can be derived by one of ordinary skill in the art from one or more embodiments of the disclosure without making any creative effort shall fall within the scope of the disclosure.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of systems and methods consistent with aspects of the present description.
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In the block chain technology, also called as distributed ledger technology, a technology in which a plurality of computing devices participate in "accounting" together and maintain a complete distributed database together is provided. An intelligent contract, in this case, generally refers to a contract defined in the form of code on a blockchain that can be triggered to execute by a transaction. For programmable blockchains, it is common for users to be supported to create and invoke some complex logic in a blockchain network. Typically, each blockchain node in such programmable blockchains can run a blockchain virtual machine, through which a user can implement the logic that can be implemented by various conventional program codes if the blockchain virtual machine is a well-crafted virtual machine. In other words, the user issues and invokes the procedures of the smart contracts in the blockchain, that is, the procedures of deploying and running the corresponding program code on the blockchain virtual machine.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating the creation of an intelligent contract and the invocation of the intelligent contract. In this example, the intelligent contract exists on the blockchain in the form of bytecode, and therefore, to create an intelligent contract in the blockchain, the intelligent contract may be written, changed into bytecode, deployed to the blockchain, and the like. When the intelligent contract is called in the block chain, a transaction pointing to the address of the intelligent contract can be initiated, the virtual machines of all the nodes on the block chain can respectively execute the transaction, and the intelligent contract code is distributively operated in the virtual machine of each node in the block chain network.
Since the smart contract can be used for realizing the management function of chain assets such as transfer, in order to improve the security of the function, the possibility that the password is cracked and the chain assets are stolen can be reduced through a longer secret key and a more complex encryption verification algorithm, for example, the length of a private key is increased from 64 bits to 256 bits, an encryption algorithm with an updated version is used, and the like.
However, the longer keys and more complex cryptographic verification algorithms described above only guarantee the protection against attacks by people outside the system, but do not prevent the malicious use of the internal person who holds the key. For example, for a block chain partially provided as a service to the public, the provider of the service often has a higher authority than that of an ordinary person, even the public and private key pairs of newly added nodes are provided by the provider of the service, so if the provider of the service actively goes bad, any complex key and encryption algorithm are in the same nominal form, and an ordinary user can only hope that the provider of the service does not go bad for the reputation of the user.
Therefore, there is a need in the art for a mechanism for performing authorization for blockchain services that can suppress malicious efforts of one party by means other than the key itself.
In this regard, the present specification proposes a service execution scheme implemented based on a multi-sign intelligent contract and implementing distributed authorization by means of voting invitation.
When the method is realized, the multi-sign intelligent contract can be used as an authorized entrance of a service to be executed; that is, the multi-sign intelligent contract may store a list of supported services, or a list of accounts with voting right, and after any account with voting right initiates an execution request of a certain service, a voting invitation is initiated to other accounts with voting right, so as to determine whether the service to be executed can be authorized to be executed by voting,
for example, Zhang three, Li four and Wang five share a necklace asset A and can transfer the necklace asset A to other people only when three persons authorize each other, so that the voting passing condition of 'only when three persons authorize each other' can be recorded in a multi-sign intelligent contract together; if a transfer transaction for the assets A on the chain is initiated on the three-way blockchain, the transaction does not directly pass through, but is responded by the multi-sign intelligent contract, voting invitations for the transfer of the assets A on the chain are respectively sent to other two persons (Li four and Wang five), and if the other two persons (Li four and Wang five) also cast a vote, the multi-sign intelligent contract judges that the transfer of the assets A on the chain is authorized enough, namely, the transfer operation for the assets A on the chain is actually executed; if any one of the other two persons (Li four, Wang five) does not throw the consent ticket, the multi-sign intelligent contract judges that the transfer of the chain asset A cannot be authorized sufficiently, and the transfer action of the chain asset A cannot be actually executed.
In the above technical solution, the multi-sign intelligent contract includes a first list describing an account with voting right and a second list describing services supported by the multi-sign intelligent contract, and invites the account with voting right to vote for service execution by means of voting invitation, so that if a target service is finally executed successfully, voting content that passes the validity check needs to meet a preset passing condition; therefore, the distributed implementation of the decision-making right is realized, the unilateral malicious action of the node is avoided, and the safety of the assets of the users on the chain can be guaranteed.
FIG. 2 is a flowchart illustrating a method for performing blockchain business based on multiple intelligent contracts according to an embodiment of the present disclosure; the method can be applied to any block chain node; the method may comprise the steps of:
s201, deploying a plurality of intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
s202, receiving a service execution request, generating a voting invitation corresponding to the service execution request and sending the voting invitation to an account in the first list under the condition that an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list;
s203, receiving voting content fed back by the account in the first list aiming at the voting invitation, and checking the legality of a signature in the voting content;
s204, determining whether the voting content passing the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
The block chain can comprise any form of block chain; in the art, blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). Furthermore, there may be a combination of the above types, such as private chain + federation chain, federation chain + public chain, and so on. The most decentralized is the public chain, the private chain can be a weak centralized system, which has strict limitation on nodes and a small number of nodes, and the federation chain is a block chain between the public chain and the private chain, which can implement "partial decentralized". The skilled person can select the specific used block chain type according to the specific service requirement, which is not limited in detail in this specification.
The node device may include a type or a form of node device; from the functional point of view, the block link node device may include a full-function node, a read-only node, a light-weight node, and the like, where the full-function node may participate in services such as consensus, intelligent contract logic calculation, and data storage, and the read-only node generally does not participate in consensus voting, and only provides a function of data storage, so as to improve the stability of the block link, and the light-weight node may only store data of several latest blocks, and its services that can be handled are relatively limited, but the storage cost that the node device needs to pay can be reduced. The block link point equipment is divided from the aspect of form, and can comprise physical equipment such as a personal computer, a smart phone and the like of an independent operation block link node client, and also can refer to a block link point virtual machine which operates in a cloud server; it should be understood that a cloud computing cluster running a plurality of blockchain nodes through a cloud native engine may also be regarded as a node device, but when discussing blockchain node individuals, it refers to each blockchain node process running relatively independently in the cloud computing cluster.
The multi-sign intelligent contract can comprise an intelligent contract which can receive a service execution request, initiate and analyze corresponding authorized voting and execute a target service according to the result of the authorized voting; it can be understood that multiple authorized intelligent contracts exist in the related art, but the existing multiple authorized intelligent contracts do not have the voting invitation function of the multiple authorized intelligent contracts in the specification, and the kernel of the existing multiple authorized intelligent contracts is a more complex signature verification logic, that is, the execution logic still receives the service request, verifies the authorized signature, and executes the service after passing, but the multiple authorized signatures are verified in the authorized signature verification stage, and the multiple authorized signatures still depend on a designated node which actually initiates the service request, and the true decentralization cannot be achieved; therefore, although there is a literal overlap with the multiple-authorization smart contracts in the related art, the mechanism of implementation of the multiple-authorization smart contracts in this specification is different.
The target services can include any services that can be completed by the intelligent contracts, such as initiating transfer transactions, deploying new intelligent contracts, invoking other intelligent contracts, writing data to the decentralized account book of the blockchain for evidence storage, and the like.
In this specification, the blockchain node may first deploy a plurality of intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract; specifically, after being written by any user client, the multi-sign intelligent contract is delivered to the block chain nodes to be packaged into a transaction for deploying the multi-sign intelligent contract, and the transaction is issued to a block chain network, so that the multi-sign intelligent contract is deployed.
It can be understood that, during specific implementation, in order to improve the compiling efficiency of the multiple intelligent contracts, a multiple intelligent contract template can be constructed in advance and delivered to the user client side needing to compile the multiple intelligent contracts; for example, a framework of the multi-sign intelligent contract is written in advance, an account list with voting right, target service content and conditions for passing the vote are left blank, and the user client can finish the writing of the multi-sign intelligent contract in a manner similar to blank filling.
It is also understood that the first list and the second list may be directly stored in the multi-sign intelligent contract code, or may be pointed to other storage services such as NAS, network hard disk, database, object storage service, and the like by way of a link, and the like; the specific storage locations, manners and internal structures of the first list and the second list can be designed by those skilled in the art according to specific requirements, and a detailed description is not required in the present specification.
In this specification, the block chain node may receive a service execution request, generate a voting invitation corresponding to the service execution request when an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list, and send the voting invitation to an account in the first list; continuing to take the situation that the aforementioned zhang san, li si and wang wu commonly own the asset a on a necklace as an example, assuming that a stranger initiates a service request for transferring assets to the multi-sign intelligent contract managed by the aforementioned three persons, the multi-sign intelligent contract can recognize that the account of the initiator of the service execution request is a stranger and does not belong to the aforementioned first list, and thus the request can be directly rejected or ignored; suppose that a request for executing the asset destroying service is initiated by zhang san and the multi-sign intelligent contract does not support the service for destroying the asset, so that the multi-sign intelligent contract can recognize that the target service indicated by the service executing request does not belong to the second list, and can directly reject or ignore the request; if a service execution request initiated by zhang san and sent to account field six is received, since zhang san belongs to the first list and the asset transfer also belongs to the second list, the multi-sign intelligent contract can generate a voting invitation corresponding to the service execution request for asset transfer and send the voting invitation to the accounts in the first list (namely, lie four and wang five).
In this specification, the blockchain node may receive voting content fed back by the account in the first list for the voting invitation, and check validity of a signature in the voting content; specifically, the voting content may mean whether the account agrees to execute the target service or not; it will of course be appreciated that in some cases, the voting content may not be limited to binary expressions of yes or no, for example, in a voting mechanism that allows for abstaining, a abstaining ticket may be cast, etc.; the specific voting content can be adapted to the specific used vote counting mechanism; those skilled in the art can design and plan a vote counting mechanism and voting content according to specific business requirements, and implement the vote counting mechanism and the voting content in the multi-sign intelligent contract in a code manner, which does not need to be listed in more detail in the present specification.
Because the other accounts with the voting right generally refer to linked accounts, the voting content fed back by each account for the voting invitation can be signed and confirmed by using the private key of the linked identity of each account; when the validity of the voting content needs to be verified, the public key of each account with the voting right can be used for decrypting and verifying the corresponding private key signature; if the verification is passed, it means that the voting content is really the real meaning expression of the account with the voting right to the target service.
It can be seen that this is also a significant difference between the multi-signature smart contract described above in this specification and the related art smart contract that verifies multiple signatures; in the scheme of the specification, the voting behavior is completed on a chain, and the operation request transaction containing multiple signatures is not constructed after the voting behavior is firstly collected to a designated node as in the related art; for the technical scheme that a plurality of signatures are carried in a single transaction in the related technology, the possibility that the designated node conducts malignancy and the voting is interrupted when the voting result does not accord with the benefit of the designated node still exists, and by applying the multi-signature intelligent contract scheme disclosed by the specification, each account with the voting right is used for voting transaction sent by the account, and the transaction is not interfered by other accounts and other nodes.
In this specification, the block chain node may determine whether voting content that passes the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service. Specifically, the specific content of the preset passing condition may be set according to specific service requirements, and in an illustrated embodiment, the passing condition includes any one or a combination of more than one of the following:
the number of votes passing the validity check is not less than a preset threshold value; for example, in an equal voting link composed of 9 users, if the majority is set, the resolution is passed, and then the preset threshold may be set to be half of 9 and then rounded up to 5;
the number of voting weighted votes passing the validity check is not less than a preset threshold value; for example, in a non-equal voting link composed of 9 common users and 1 administrator, the weight of the number of votes of the common users is 1, and the weight of the number of votes of the administrator is 2, and compared with an equal voting scheme, the scheme for judging whether to pass or not can better adapt to decision groups with different decision weights;
the votes passing the validity check do not contain a negative vote; for example, in an unequal voting link formed by 6 common users and 3 administrators, if the administrators hold a vote rejection, the administrators can be guaranteed to have higher control over voting results, and certain decision scenarios requiring a vote rejection mechanism can be met.
It can be understood that the preset passing condition may be a passing condition used by all services in a unified manner, or may be a passing condition customized exclusively for different services; in one embodiment shown, if the passing conditions used by different services are different, the corresponding relationship between the service and the passing condition can be stored in the relationship table in advance for subsequent query; that is to say, when it is required to determine whether the voting content passing the validity check meets the preset passing condition, a preset service-passing condition correspondence table may be read from the storage area corresponding to the multi-sign intelligent contract, and the passing condition corresponding to the target service may be searched from the preset service-passing condition correspondence table; and then determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
Referring to fig. 3, fig. 3 is an exemplary diagram of an interaction for completing a target service based on a multi-sign intelligent contract, shown in this specification; in this example, the initiator may first initiate an execution request of the target service to the multi-sign intelligent contract, and the multi-sign intelligent contract may confirm that the identity of the initiator is legal (belongs to the first list) and the target service is supported by the multi-sign intelligent contract (belongs to the second list) through the built-in logic; then, the multi-sign intelligent contract can generate a corresponding voting invitation and send the voting invitation to other accounts with voting right under the condition that the confirmation process passes, wait for the other accounts with voting right to make a decision, generate a voting transaction and send the voting transaction to the multi-sign intelligent contract; then, the multi-sign intelligent contract can firstly check the legality of the signature carried in the received voting transaction, then determine whether the voting content (agreement or not, etc.) carried in the legal voting transaction meets the preset passing condition, and if so, execute the target service.
It can be understood that, in the event that the vote fails, the initiator may be notified of the voting situation, so that the initiator may modify the service content in a targeted manner, strive for a higher passing probability; such subsequent processing means need not be all enumerated in this specification, and can be accomplished by those skilled in the art according to specific needs.
In this specification, the specific content of the target service may be set according to specific service requirements; the following three more basic service types can be provided in the present specification, and those skilled in the art can complete corresponding service code design and development according to specific service requirements with reference to the following description, and complete docking and adaptation with the above-mentioned multi-sign intelligent contract in the present specification.
In one embodiment, the target service may include a calling service contract; the above method may further comprise: after the multi-sign intelligent contract is deployed, deploying a service contract, wherein a legal calling initiating address of the service contract is specified as an address of the multi-sign intelligent contract; the executing the target service may include: and taking the address of the multi-label intelligent contract as an initiating address, and initiating a contract to the service contract to call a transaction. It can be understood that, for a service contract, if a service that actually needs to be implemented needs to be changed, a new version of the service contract may be deployed on a chain, and an address of an original service contract recorded in a multi-sign intelligent contract is replaced with an address of the new version of the service contract, thereby implementing an update of the service contract; that is to say, the mode of calling the service contract by multiple intelligent contracts to actually complete the service can improve the expansibility and maintainability of the intelligent contract to a certain extent.
In one embodiment shown, the target service may include an on-chain transfer; the executing the target service may include: constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request; and issuing the chain transfer transaction to the block chain. By applying the scheme, safe and reliable group decision can be realized, and the safety of the asset transfer process is guaranteed.
In an embodiment shown, the target service may include a modification service for the first list and/or the second list and/or a preset passing condition; the executing the target service may include: and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request. Continuing to take the scenario that the aforementioned zhang san, li xi and wang wu commonly own the asset a on a necklace as an example, assuming that the field six of the newly added user is a legal voting user, the target service may be "add field six in the first list"; in specific implementation, the modification codes of the first list, the second list and the preset passing condition can be directly written into the contract logic which can be called, so that the contract self-upgrading based on group decision is realized.
The above contents are all embodiments of the present specification for the block chain service execution method based on multiple intelligent contracts. Based on the above embodiments, it can be seen that, by applying the scheme described in this specification, at least distributed implementation of decision-making rights can be achieved, single-sided malicious behavior of nodes is avoided, and safety of assets of users on a chain can be guaranteed.
The present specification further provides an embodiment of a corresponding block chain service execution device based on multiple intelligent contracts, where:
the present specification provides a block chain service execution device based on multiple intelligent contracts, which is applied to any block chain node, please refer to fig. 4, where fig. 4 is a structural example diagram of a block chain service execution device based on multiple intelligent contracts shown in the present specification, and the device may include the following modules:
a first deployment module 401, which deploys multiple intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
an invitation module 402, configured to receive a service execution request, generate a voting invitation corresponding to the service execution request and send the voting invitation to an account in the first list when an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list;
a checking module 403, receiving voting content fed back by the account in the first list for the voting invitation, and checking validity of a signature in the voting content;
the execution module 404 determines whether the voting content passing the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
In a specific embodiment, the execution module may further: reading a preset service-passing condition corresponding relation table from a storage area corresponding to the multi-sign intelligent contract, and searching a passing condition corresponding to the target service from the preset service-passing condition corresponding relation table; and determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
In one embodiment, the above-mentioned passing condition may include any one or a combination of more than one of the following:
the number of votes passing the validity check is not less than a preset threshold value;
the number of voting weighted votes passing the validity check is not less than a preset threshold value;
the votes passed by the validity check do not contain a negative vote.
In one embodiment, the target service may include a call service contract; the above apparatus may further include: a second deployment module, which deploys the service contract after deploying the multi-sign intelligent contract, wherein the legal calling initiation address of the service contract is designated as the address of the multi-sign intelligent contract; the execution module may further: and taking the address of the multi-label intelligent contract as an initiating address, and initiating a contract to the service contract to call a transaction.
In one embodiment, the target service may include an on-chain transfer; the execution module may further: constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request; and issuing the chain transfer transaction to the block chain.
In a specific embodiment, the target service may include a modification service for the first list and/or the second list and/or a preset passing condition; the execution module may further: and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request.
The embodiments of the present specification also provide a computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the foregoing block chain service execution method based on multiple intelligent contracts when executing the program.
Fig. 5 is a schematic diagram illustrating a more specific hardware structure of a computing device according to an embodiment of the present disclosure, where the computing device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the foregoing method for performing a blockchain service based on a multi-sign intelligent contract.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.

Claims (14)

1. A block chain business execution method based on a multi-sign intelligent contract is applied to any block chain node; the method comprises the following steps:
deploying a plurality of intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
receiving a service execution request, generating a voting invitation corresponding to the service execution request and sending the voting invitation to an account in the first list under the condition that an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list;
receiving voting content fed back by the account in the first list aiming at the voting invitation, and checking the legality of a signature in the voting content;
determining whether the voting content passing the validity check meets a preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
2. The method of claim 1, wherein the determining whether the voting content passing the validity check meets a preset passing condition comprises:
reading a preset service-passing condition corresponding relation table from a storage area corresponding to the multiple intelligent contracts, and searching a passing condition corresponding to the target service;
and determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
3. The method of claim 1, wherein the passing conditions comprise any one or a combination of more of the following:
the number of votes passing the validity check is not less than a preset threshold value;
the number of voting weighted votes passing the validity check is not less than a preset threshold value;
the votes passed by the validity check do not contain a negative vote.
4. The method of claim 1, the target service comprising a call service contract; the method further comprises the following steps:
after the multi-sign intelligent contract is deployed, deploying a service contract, wherein a legal calling initiating address of the service contract is specified as an address of the multi-sign intelligent contract;
the executing the target service includes:
and taking the address of the multi-label intelligent contract as an initiating address, and initiating contract invoking transaction to the service contract.
5. The method of claim 1, the target service comprising an on-chain transfer; the executing the target service includes:
constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request;
and issuing the chain on-account transaction to the blockchain.
6. The method of claim 1, wherein the target service comprises a modification service to the first list and/or the second list and/or a preset passing condition;
the executing the target service includes:
and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request.
7. A block chain business execution device based on a multi-sign intelligent contract is applied to any block chain node; the method comprises the following steps:
the first deployment module is used for deploying the multiple intelligent contracts; the multi-sign intelligent contract comprises a first list recording accounts with voting authority and a second list recording services supported by the multi-sign intelligent contract;
the invitation module is used for receiving a service execution request, generating a voting invitation corresponding to the service execution request under the condition that an initiator account of the service execution request belongs to the first list and a target service indicated by the service execution request belongs to the second list, and sending the voting invitation to an account in the first list;
the verification module is used for receiving voting content fed back by the account in the first list aiming at the voting invitation and verifying the legality of a signature in the voting content;
the execution module is used for determining whether the voting content passing the validity check meets the preset passing condition; if the passing condition is met, calling an execution logic corresponding to the service indicated by the service execution request in the multi-sign intelligent contract to execute the target service.
8. The apparatus of claim 7, the execution module further to:
reading a preset service-passing condition corresponding relation table from a storage area corresponding to the multiple intelligent contracts, and searching a passing condition corresponding to the target service; and determining whether the voting content passing the validity check meets the passing condition corresponding to the target service.
9. The apparatus of claim 7, wherein the passing conditions comprise any one or a combination of more of:
the number of votes passing the validity check is not less than a preset threshold value;
the number of voting weighted votes passing the validity check is not less than a preset threshold value;
the votes passed by the validity check do not contain a negative vote.
10. The apparatus of claim 7, the target service comprising a call service contract; the device further comprises:
the second deployment module is used for deploying the service contract after the multi-sign intelligent contract is deployed, wherein the legal calling initiating address of the service contract is specified as the address of the multi-sign intelligent contract;
the execution module further:
and taking the address of the multi-label intelligent contract as an initiating address, and initiating contract invoking transaction to the service contract.
11. The apparatus of claim 7, the target service comprising an on-chain transfer; the execution module further:
constructing chain transfer transaction according to the destination address and the transfer amount of the chain transfer indicated by the service execution request;
and issuing the chain on-account transaction to the blockchain.
12. The apparatus of claim 7, wherein the target service comprises a modification service to the first list and/or the second list and/or a preset passing condition;
the execution module further:
and calling a preset modification logic in the multi-sign intelligent contract, and modifying the first list and/or the second list and/or a preset passing condition according to the indication of the service execution request.
13. A computer device comprising at least a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the apparatus of any of claims 1 to 6 when executing the program.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202111599106.4A 2021-12-24 2021-12-24 Block chain service execution method and device based on multi-sign intelligent contract Pending CN114372280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111599106.4A CN114372280A (en) 2021-12-24 2021-12-24 Block chain service execution method and device based on multi-sign intelligent contract

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111599106.4A CN114372280A (en) 2021-12-24 2021-12-24 Block chain service execution method and device based on multi-sign intelligent contract

Publications (1)

Publication Number Publication Date
CN114372280A true CN114372280A (en) 2022-04-19

Family

ID=81141517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111599106.4A Pending CN114372280A (en) 2021-12-24 2021-12-24 Block chain service execution method and device based on multi-sign intelligent contract

Country Status (1)

Country Link
CN (1) CN114372280A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604121A (en) * 2022-11-27 2023-01-13 中国信息通信研究院(Cn) Industrial Internet service processing method, device and equipment based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604121A (en) * 2022-11-27 2023-01-13 中国信息通信研究院(Cn) Industrial Internet service processing method, device and equipment based on block chain

Similar Documents

Publication Publication Date Title
US20220277307A1 (en) Systems and methods for personal identification and verification
US11270306B2 (en) Asset management method and apparatus, and electronic device
CN108492180B (en) Asset management method and device and electronic equipment
US10902425B2 (en) System and method for biometric credit based on blockchain
CN111770201B (en) Data verification method, device and equipment
Bozic et al. Securing virtual machine orchestration with blockchains
CN103516718A (en) Identity risk score generation and implementation
CN111327564B (en) Access method and device for alliance chain
CN111770198B (en) Information sharing method, device and equipment
CN111383114A (en) Asset information management method and device based on block chain
KR102627868B1 (en) Method and system for authenticating data generated in blockchain
US20230291566A1 (en) Blockchain identities
CN111402033A (en) Asset information management method and device based on block chain
CN111770112A (en) Information sharing method, device and equipment
CN114372280A (en) Block chain service execution method and device based on multi-sign intelligent contract
KR102572834B1 (en) Method and system for authenticating data generated in a blockchain using a signable contract
JP2020109617A (en) Transaction processing system and method for enabling extention of block chain
CN111814193B (en) Information sharing method, device and equipment
CN113806335A (en) Data migration method and device applied to block chain
JP2023521901A (en) Mobile application forgery/falsification detection method, computer program, computer-readable recording medium and computer device using user identifier and signature collection
CN111953773B (en) De-centralized address mapping method and device
US20230281585A1 (en) Systems and Methods for Managing Network-Agnostic Smart Contracts
US20230251905A1 (en) Synchronizing computing resources to proceed with a task
WO2023069505A1 (en) Non-transferable token
Gupta et al. Security, Privacy, and Trust Management and Performance Optimization of Blockchain

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 2339, 2nd Floor, No. 92, Huancheng North Road, Gongshu District, Hangzhou City, Zhejiang Province 310005

Applicant after: Hangzhou Xita Technology Co.,Ltd.

Address before: 310007 room 2001 and 2010, 20 / F, tower a, Huaxing Times Square, No. 478, Wensan Road, Xihu District, Hangzhou, Zhejiang

Applicant before: Hangzhou Xita Technology Co.,Ltd.